Class: Rubinius::ToolSet.current::TS::AST::ModuleName
- Defined in:
- lib/rubinius/ast/definitions.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
Attributes inherited from Node
Instance Method Summary collapse
- #bytecode(g) ⇒ Object
-
#initialize(line, name) ⇒ ModuleName
constructor
A new instance of ModuleName.
- #name_bytecode(g) ⇒ Object
- #to_sexp ⇒ Object
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, name) ⇒ ModuleName
Returns a new instance of ModuleName.
855 856 857 858 |
# File 'lib/rubinius/ast/definitions.rb', line 855 def initialize(line, name) @line = line @name = name end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
853 854 855 |
# File 'lib/rubinius/ast/definitions.rb', line 853 def name @name end |
Instance Method Details
#bytecode(g) ⇒ Object
865 866 867 868 869 870 871 |
# File 'lib/rubinius/ast/definitions.rb', line 865 def bytecode(g) pos(g) name_bytecode(g) g.push_scope g.send :open_module, 2 end |
#name_bytecode(g) ⇒ Object
860 861 862 863 |
# File 'lib/rubinius/ast/definitions.rb', line 860 def name_bytecode(g) g.push_rubinius g.push_literal @name end |
#to_sexp ⇒ Object
873 874 875 |
# File 'lib/rubinius/ast/definitions.rb', line 873 def to_sexp @name end |