Module: Reek::Source::SexpExtensions::DefNode

Includes:
MethodNodeBase
Defined in:
lib/reek/source/sexp_extensions.rb

Overview

Utility methods for :def nodes.

Instance Method Summary collapse

Methods included from MethodNodeBase

#arg_names, #arguments, #body_nodes, #ends_with_bang?, #name_without_bang, #parameter_names, #parameters

Instance Method Details

#argslistObject


217
# File 'lib/reek/source/sexp_extensions.rb', line 217

def argslist() self[2] end

#bodyObject


219
220
221
# File 'lib/reek/source/sexp_extensions.rb', line 219

def body
  self[3]
end

#full_name(outer) ⇒ Object


223
224
225
226
# File 'lib/reek/source/sexp_extensions.rb', line 223

def full_name(outer)
  prefix = outer == '' ? '' : "#{outer}#"
  "#{prefix}#{name}"
end

#nameObject


216
# File 'lib/reek/source/sexp_extensions.rb', line 216

def name() self[1] end