Class: CodeTools::AST::ModuleName
- Inherits:
-
Node
- Object
- Node
- CodeTools::AST::ModuleName
show all
- Defined in:
- lib/rubinius/code/ast/definitions.rb
Instance Attribute Summary collapse
Attributes inherited from Node
#line
Instance Method Summary
collapse
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
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
|