Class: CodeTools::AST::ToplevelClassName
- Defined in:
- lib/rubinius/code/ast/definitions.rb
Instance Attribute Summary
Attributes inherited from ClassName
Attributes inherited from Node
Instance Method Summary collapse
- #bytecode(g) ⇒ Object
-
#initialize(line, node, superclass) ⇒ ToplevelClassName
constructor
A new instance of ToplevelClassName.
- #to_sexp ⇒ Object
Methods inherited from ClassName
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, superclass) ⇒ ToplevelClassName
Returns a new instance of ToplevelClassName.
892 893 894 895 896 |
# File 'lib/rubinius/code/ast/definitions.rb', line 892 def initialize(line, node, superclass) @line = line @name = node.name @superclass = superclass end |
Instance Method Details
#bytecode(g) ⇒ Object
898 899 900 901 902 903 904 |
# File 'lib/rubinius/code/ast/definitions.rb', line 898 def bytecode(g) pos(g) name_bytecode(g) g.push_cpath_top g.send :open_class_under, 3 end |
#to_sexp ⇒ Object
906 907 908 |
# File 'lib/rubinius/code/ast/definitions.rb', line 906 def to_sexp [:colon3, @name] end |