Module: Reek::AST::SexpExtensions::DefsNode
- Includes:
- MethodNodeBase
- Defined in:
- lib/reek/ast/sexp_extensions/methods.rb
Overview
Utility methods for :defs nodes.
Instance Method Summary
collapse
#arg_names, #arguments, #body_nodes, #ends_with_bang?, #name_without_bang, #parameter_names, #parameters
Instance Method Details
#argslist ⇒ Object
77
78
79
|
# File 'lib/reek/ast/sexp_extensions/methods.rb', line 77
def argslist
children[2]
end
|
#body ⇒ Object
81
82
83
|
# File 'lib/reek/ast/sexp_extensions/methods.rb', line 81
def body
children[3]
end
|
#depends_on_instance? ⇒ Boolean
90
91
92
|
# File 'lib/reek/ast/sexp_extensions/methods.rb', line 90
def depends_on_instance?
false
end
|
#full_name(outer) ⇒ Object
85
86
87
88
|
# File 'lib/reek/ast/sexp_extensions/methods.rb', line 85
def full_name(outer)
prefix = outer == '' ? '' : "#{outer}#"
"#{prefix}#{receiver.name}.#{name}"
end
|
#name ⇒ Object
73
74
75
|
# File 'lib/reek/ast/sexp_extensions/methods.rb', line 73
def name
children[1]
end
|
#receiver ⇒ Object
69
70
71
|
# File 'lib/reek/ast/sexp_extensions/methods.rb', line 69
def receiver
children.first
end
|