Class: CodeTools::AST::ClassScope

Inherits:
ClosedScope show all
Defined in:
lib/rubinius/code/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.



819
820
821
822
823
# File 'lib/rubinius/code/ast/definitions.rb', line 819

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

Instance Method Details

#bytecode(g) ⇒ Object



829
830
831
832
833
# File 'lib/rubinius/code/ast/definitions.rb', line 829

def bytecode(g)
  pos(g)

  attach_and_call g, :__class_init__, true
end

#module?Boolean

Returns:

  • (Boolean)


825
826
827
# File 'lib/rubinius/code/ast/definitions.rb', line 825

def module?
  true
end