Module: Reek::AST::SexpExtensions::DefNode
- Includes:
- MethodNodeBase
- Defined in:
- lib/reek/ast/sexp_extensions/methods.rb
Overview
Utility methods for :def nodes.
Instance Method Summary
collapse
#arg_names, #arguments, #body_nodes, #ends_with_bang?, #name_without_bang, #parameter_names, #parameters
Instance Method Details
#argslist ⇒ Object
48
49
50
|
# File 'lib/reek/ast/sexp_extensions/methods.rb', line 48
def argslist
children[1]
end
|
#body ⇒ Object
52
53
54
|
# File 'lib/reek/ast/sexp_extensions/methods.rb', line 52
def body
children[2]
end
|
#depends_on_instance? ⇒ Boolean
#full_name(outer) ⇒ Object
56
57
58
|
# File 'lib/reek/ast/sexp_extensions/methods.rb', line 56
def full_name(outer)
[outer, name].reject(&:empty?).join('#')
end
|
#name ⇒ Object
44
45
46
|
# File 'lib/reek/ast/sexp_extensions/methods.rb', line 44
def name
children.first
end
|