Class: CodeTools::AST::ScopedModuleName
- Inherits:
-
ModuleName
- Object
- Node
- ModuleName
- CodeTools::AST::ScopedModuleName
- Defined in:
- lib/rubinius/code/ast/definitions.rb
Instance Attribute Summary collapse
-
#parent ⇒ Object
Returns the value of attribute parent.
Attributes inherited from ModuleName
Attributes inherited from Node
Instance Method Summary collapse
- #bytecode(g) ⇒ Object
-
#initialize(line, node) ⇒ ScopedModuleName
constructor
A new instance of ScopedModuleName.
- #to_sexp ⇒ Object
Methods inherited from ModuleName
Methods inherited from Node
#ascii_graph, #attributes, #children, #defined, match_arguments?, match_send?, #new_block_generator, #new_generator, #node_name, #or_bytecode, #pos, #set_child, #transform, transform, transform_comment, transform_kind, transform_kind=, transform_name, #value_defined, #visit, #walk
Constructor Details
#initialize(line, node) ⇒ ScopedModuleName
Returns a new instance of ScopedModuleName.
998 999 1000 1001 1002 |
# File 'lib/rubinius/code/ast/definitions.rb', line 998 def initialize(line, node) @line = line @name = node.name @parent = node.parent end |
Instance Attribute Details
#parent ⇒ Object
Returns the value of attribute parent.
996 997 998 |
# File 'lib/rubinius/code/ast/definitions.rb', line 996 def parent @parent end |
Instance Method Details
#bytecode(g) ⇒ Object
1004 1005 1006 1007 1008 1009 1010 |
# File 'lib/rubinius/code/ast/definitions.rb', line 1004 def bytecode(g) pos(g) name_bytecode(g) @parent.bytecode(g) g.send :open_module_under, 2 end |
#to_sexp ⇒ Object
1012 1013 1014 |
# File 'lib/rubinius/code/ast/definitions.rb', line 1012 def to_sexp [:colon2, @parent.to_sexp, @name] end |