Class: Rubinius::AST::SClass

Inherits:
Node
  • Object
show all
Defined in:
lib/compiler/ast/definitions.rb

Instance Attribute Summary collapse

Attributes inherited from Node

#line

Instance Method Summary collapse

Methods inherited from Node

#ascii_graph, #attributes, #children, match_arguments?, match_send?, #new_block_generator, #new_generator, #node_name, node_name, #pos, #set_child, transform, #transform, transform_comment, transform_kind, transform_kind=, transform_name, #visit, #walk

Constructor Details

#initialize(line, receiver, body) ⇒ SClass

Returns a new instance of SClass.



607
608
609
610
611
# File 'lib/compiler/ast/definitions.rb', line 607

def initialize(line, receiver, body)
  @line = line
  @receiver = receiver
  @body = SClassScope.new line, body
end

Instance Attribute Details

#receiverObject

Returns the value of attribute receiver.



605
606
607
# File 'lib/compiler/ast/definitions.rb', line 605

def receiver
  @receiver
end

Instance Method Details

#to_sexpObject



613
614
615
# File 'lib/compiler/ast/definitions.rb', line 613

def to_sexp
  [:sclass, @receiver.to_sexp, @body.to_sexp]
end