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

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

Instance Attribute Summary

Attributes inherited from ClosedScope

#body

Attributes inherited from Node

#line

Instance Method Summary collapse

Methods inherited from ClosedScope

#assign_local_reference, #attach_and_call, #nest_scope, #new_local, #new_nested_local, #search_local, #to_sexp

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, #to_sexp, #transform, transform, transform_comment, transform_kind, transform_kind=, transform_name, #value_defined, #visit, #walk

Constructor Details

#initialize(line, name, body) ⇒ ClassScope

Returns a new instance of ClassScope.



721
722
723
724
725
# File 'lib/rubinius/ast/definitions.rb', line 721

def initialize(line, name, body)
  @line = line
  @name = name.name
  @body = body
end

Instance Method Details

#bytecode(g) ⇒ Object



731
732
733
734
735
# File 'lib/rubinius/ast/definitions.rb', line 731

def bytecode(g)
  pos(g)

  attach_and_call g, :__class_init__, true
end

#module?Boolean

Returns:

  • (Boolean)


727
728
729
# File 'lib/rubinius/ast/definitions.rb', line 727

def module?
  true
end