Class: CodeTools::AST::ScopedClassName
- Defined in:
- lib/rubinius/code/ast/definitions.rb
Instance Attribute Summary collapse
-
#parent ⇒ Object
Returns the value of attribute parent.
Attributes inherited from ClassName
Attributes inherited from Node
Instance Method Summary collapse
- #bytecode(g) ⇒ Object
-
#initialize(line, node, superclass) ⇒ ScopedClassName
constructor
A new instance of ScopedClassName.
- #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) ⇒ ScopedClassName
Returns a new instance of ScopedClassName.
914 915 916 917 918 919 |
# File 'lib/rubinius/code/ast/definitions.rb', line 914 def initialize(line, node, superclass) @line = line @name = node.name @parent = node.parent @superclass = superclass end |
Instance Attribute Details
#parent ⇒ Object
Returns the value of attribute parent.
912 913 914 |
# File 'lib/rubinius/code/ast/definitions.rb', line 912 def parent @parent end |
Instance Method Details
#bytecode(g) ⇒ Object
921 922 923 924 925 926 927 |
# File 'lib/rubinius/code/ast/definitions.rb', line 921 def bytecode(g) pos(g) name_bytecode(g) @parent.bytecode(g) g.send :open_class_under, 3 end |
#to_sexp ⇒ Object
929 930 931 |
# File 'lib/rubinius/code/ast/definitions.rb', line 929 def to_sexp [:colon2, @parent.to_sexp, @name] end |