Class: Melbourne::AST::ElementAssignment
- Inherits:
-
SendWithArguments
- Object
- Node
- Send
- SendWithArguments
- Melbourne::AST::ElementAssignment
- Defined in:
- lib/melbourne/ast/sends.rb
Overview
An element assignment as in:
a[0] = 1
Instance Attribute Summary
Attributes inherited from SendWithArguments
Attributes inherited from Send
#block, #check_for_local, #name, #privately, #receiver, #variable
Attributes inherited from Node
Instance Method Summary collapse
-
#initialize(line, receiver, arguments) ⇒ ElementAssignment
constructor
A new instance of ElementAssignment.
Methods inherited from Node
Constructor Details
#initialize(line, receiver, arguments) ⇒ ElementAssignment
Returns a new instance of ElementAssignment.
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
# File 'lib/melbourne/ast/sends.rb', line 83 def initialize(line, receiver, arguments) @line = line @receiver = receiver @privately = receiver.kind_of?(Self) ? true : false @name = :[]= case arguments when PushArgs @arguments = arguments else @arguments = ActualArguments.new line, arguments end end |