class Yoda::Parsing::Scopes::ModuleDefinition

Wrapper class for class node. @see github.com/whitequark/parser/blob/2.2/doc/AST_FORMAT.md#module “` (module (const nil :Foo) (nil)) “module Foo; end”

~~~~~~ keyword
            ~~~ end

“`

Public Instance Methods

body_node() click to toggle source
# File lib/yoda/parsing/scopes/module_definition.rb, line 21
def body_node
  node.children.last
end
body_nodes() click to toggle source
# File lib/yoda/parsing/scopes/module_definition.rb, line 17
def body_nodes
  [body_node]
end
const_node() click to toggle source
# File lib/yoda/parsing/scopes/module_definition.rb, line 13
def const_node
  @const_node ||= NodeObjects::ConstNode.new(node.children[0])
end
kind() click to toggle source
# File lib/yoda/parsing/scopes/module_definition.rb, line 25
def kind
  :module
end
scope_name() click to toggle source

@return [String]

# File lib/yoda/parsing/scopes/module_definition.rb, line 30
def scope_name
  const_node.to_s(parent.scope_name)
end