Class: Melbourne::AST::AttributeAssignment

Inherits:
SendWithArguments show all
Defined in:
lib/melbourne/ast/sends.rb

Overview

An attribute assignment as in:

object.attribute = 1

Instance Attribute Summary

Attributes inherited from SendWithArguments

#arguments

Attributes inherited from Send

#block, #check_for_local, #name, #privately, #receiver, #variable

Attributes inherited from Node

#line

Instance Method Summary collapse

Methods inherited from Node

#ascii_graph

Constructor Details

#initialize(line, receiver, name, arguments) ⇒ AttributeAssignment

Returns a new instance of AttributeAssignment.



64
65
66
67
68
69
70
71
72
73
# File 'lib/melbourne/ast/sends.rb', line 64

def initialize(line, receiver, name, arguments)
  @line = line

  @receiver = receiver
  @privately = receiver.kind_of?(Self) ? true : false

  @name = :"#{name}="

  @arguments = ActualArguments.new line, arguments
end