Class: Melbourne::AST::SClass

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

Overview

A singleton class as in:

class X
  class << self
  end
end

Instance Attribute Summary collapse

Attributes inherited from Node

#line

Instance Method Summary collapse

Methods inherited from Node

#ascii_graph

Constructor Details

#initialize(line, receiver, body) ⇒ SClass

Returns a new instance of SClass.



481
482
483
484
485
# File 'lib/melbourne/ast/definitions.rb', line 481

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

Instance Attribute Details

#receiverObject

The receiver (for class << self, self is the receiver)



479
480
481
# File 'lib/melbourne/ast/definitions.rb', line 479

def receiver
  @receiver
end