class Yoda::Parsing::Scopes::MethodDefinition
Wrapper class for instance method node. @see github.com/whitequark/parser/blob/2.2/doc/AST_FORMAT.md#instance-methods “` (def :foo (args) nil) “def foo; end”
~~~ keyword ~~~ name ~~~ end ~~~~~~~~~~~~ expression
“`
Public Instance Methods
ancestor_scopes()
click to toggle source
@return [Array<String>]
# File lib/yoda/parsing/scopes/method_definition.rb, line 63 def ancestor_scopes parent.ancestor_scopes end
arg_node()
click to toggle source
@return [Parser::AST::Node]
# File lib/yoda/parsing/scopes/method_definition.rb, line 21 def arg_node node.children[1] end
body_node()
click to toggle source
@return [Parser::AST::Node]
# File lib/yoda/parsing/scopes/method_definition.rb, line 26 def body_node node.children[2] end
body_nodes()
click to toggle source
@return [Array<Parser::AST::Node>]
# File lib/yoda/parsing/scopes/method_definition.rb, line 31 def body_nodes [body_node] end
full_name()
click to toggle source
@return [String]
# File lib/yoda/parsing/scopes/method_definition.rb, line 36 def full_name "#{namespace.full_name}##{name}" end
kind()
click to toggle source
# File lib/yoda/parsing/scopes/method_definition.rb, line 49 def kind :method end
method?()
click to toggle source
# File lib/yoda/parsing/scopes/method_definition.rb, line 53 def method? true end
name()
click to toggle source
@return [Symbol]
# File lib/yoda/parsing/scopes/method_definition.rb, line 16 def name node.children[0] end
namespace_name()
click to toggle source
@return [String]
# File lib/yoda/parsing/scopes/method_definition.rb, line 41 def namespace_name namespace.full_name end
scope_name()
click to toggle source
@return [String]
# File lib/yoda/parsing/scopes/method_definition.rb, line 58 def scope_name parent.scope_name end
singleton?()
click to toggle source
# File lib/yoda/parsing/scopes/method_definition.rb, line 45 def singleton? false end