Class: Rubinius::ToolSet.current::TS::AST::ScopedClassName

Inherits:
ClassName
  • Object
show all
Defined in:
lib/rubinius/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.



789
790
791
792
793
794
# File 'lib/rubinius/ast/definitions.rb', line 789

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.



787
788
789
# File 'lib/rubinius/ast/definitions.rb', line 787

def parent
  @parent
end

Instance Method Details

#bytecode(g) ⇒ Object



796
797
798
799
800
801
802
# File 'lib/rubinius/ast/definitions.rb', line 796

def bytecode(g)
  pos(g)

  name_bytecode(g)
  @parent.bytecode(g)
  g.send :open_class_under, 3
end

#to_sexpObject



804
805
806
# File 'lib/rubinius/ast/definitions.rb', line 804

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