Class: Rubinius::ToolSet.current::TS::AST::ToplevelModuleName
- Inherits:
-
ModuleName
- Object
- Node
- ModuleName
- Rubinius::ToolSet.current::TS::AST::ToplevelModuleName
- Defined in:
- lib/rubinius/ast/definitions.rb
Instance Attribute Summary
Attributes inherited from ModuleName
Attributes inherited from Node
Instance Method Summary collapse
- #bytecode(g) ⇒ Object
-
#initialize(line, node) ⇒ ToplevelModuleName
constructor
A new instance of ToplevelModuleName.
- #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) ⇒ ToplevelModuleName
Returns a new instance of ToplevelModuleName.
879 880 881 882 |
# File 'lib/rubinius/ast/definitions.rb', line 879 def initialize(line, node) @line = line @name = node.name end |
Instance Method Details
#bytecode(g) ⇒ Object
884 885 886 887 888 889 890 |
# File 'lib/rubinius/ast/definitions.rb', line 884 def bytecode(g) pos(g) name_bytecode(g) g.push_cpath_top g.send :open_module_under, 2 end |
#to_sexp ⇒ Object
892 893 894 |
# File 'lib/rubinius/ast/definitions.rb', line 892 def to_sexp [:colon3, @name] end |