Class: CodeTools::AST::ModuleName
- Defined in:
- lib/rubinius/code/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.
1004 1005 1006 1007 |
# File 'lib/rubinius/code/ast/definitions.rb', line 1004 def initialize(line, name) @line = line @name = name end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
1002 1003 1004 |
# File 'lib/rubinius/code/ast/definitions.rb', line 1002 def name @name end |
Instance Method Details
#bytecode(g) ⇒ Object
1014 1015 1016 1017 1018 1019 1020 |
# File 'lib/rubinius/code/ast/definitions.rb', line 1014 def bytecode(g) pos(g) name_bytecode(g) g.push_scope g.send :open_module, 2 end |
#name_bytecode(g) ⇒ Object
1009 1010 1011 1012 |
# File 'lib/rubinius/code/ast/definitions.rb', line 1009 def name_bytecode(g) g.push_rubinius g.push_literal @name end |
#to_sexp ⇒ Object
1022 1023 1024 |
# File 'lib/rubinius/code/ast/definitions.rb', line 1022 def to_sexp @name end |