class Yoda::Parsing::Scopes::SingletonMethodDefinition

Wrapper class for singleton method node. @see github.com/whitequark/parser/blob/2.2/doc/AST_FORMAT.md#singleton-methods “` (defs (self) :foo (args) nil) “def self.foo; end”

~~~ keyword
         ~~~ name
              ~~~ end
~~~~~~~~~~~~~~~~~ expression

“`

Public Instance Methods

arg_node() click to toggle source

@return [Parser::AST::Node]

# File lib/yoda/parsing/scopes/meta_method_definition.rb, line 21
def arg_node
  node.children[2]
end
body_node() click to toggle source

@return [Parser::AST::Node]

# File lib/yoda/parsing/scopes/meta_method_definition.rb, line 26
def body_node
  node.children[3]
end
body_nodes() click to toggle source

@return [Array<Parser::AST::Node>]

# File lib/yoda/parsing/scopes/meta_method_definition.rb, line 31
def body_nodes
  [body_node]
end
find_evaluation_root_scope(current_location) click to toggle source

@param current_location [Location] @return [Namespace, nil]

# File lib/yoda/parsing/scopes/meta_method_definition.rb, line 64
def find_evaluation_root_scope(current_location)
  return nil
end
full_name() click to toggle source

@return [String]

# File lib/yoda/parsing/scopes/meta_method_definition.rb, line 40
def full_name
  "#{namespace.full_name}##{name}"
end
kind() click to toggle source
# File lib/yoda/parsing/scopes/meta_method_definition.rb, line 49
def kind
  :meta_method
end
method?() click to toggle source
# File lib/yoda/parsing/scopes/meta_method_definition.rb, line 53
def method?
  true
end
name() click to toggle source

@return [Symbol]

# File lib/yoda/parsing/scopes/meta_method_definition.rb, line 16
def name
  node.children[1]
end
namespace_name() click to toggle source

@return [String]

# File lib/yoda/parsing/scopes/meta_method_definition.rb, line 45
def namespace_name
  namespace.full_name
end
scope_name() click to toggle source

@return [String]

# File lib/yoda/parsing/scopes/meta_method_definition.rb, line 58
def scope_name
  parent.scope_name
end