Class: CodeTools::AST::ScopedClassName

Inherits:
ClassName show all
Defined in:
lib/rubinius/code/ast/definitions.rb

Instance Attribute Summary collapse

Attributes inherited from ClassName

#name, #superclass

Attributes inherited from Node

#line

Instance Method Summary collapse

Methods inherited from ClassName

#name_bytecode

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

#parentObject

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_sexpObject



929
930
931
# File 'lib/rubinius/code/ast/definitions.rb', line 929

def to_sexp
  [:colon2, @parent.to_sexp, @name]
end