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.
953 954 955 956 |
# File 'lib/rubinius/code/ast/definitions.rb', line 953 def initialize(line, name) @line = line @name = name end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
951 952 953 |
# File 'lib/rubinius/code/ast/definitions.rb', line 951 def name @name end |
Instance Method Details
#bytecode(g) ⇒ Object
963 964 965 966 967 968 969 |
# File 'lib/rubinius/code/ast/definitions.rb', line 963 def bytecode(g) pos(g) name_bytecode(g) g.push_scope g.send :open_module, 2 end |
#name_bytecode(g) ⇒ Object
958 959 960 961 |
# File 'lib/rubinius/code/ast/definitions.rb', line 958 def name_bytecode(g) g.push_rubinius g.push_literal @name end |
#to_sexp ⇒ Object
971 972 973 |
# File 'lib/rubinius/code/ast/definitions.rb', line 971 def to_sexp @name end |