Class: Melbourne::AST::OpAssign2
- Defined in:
- lib/melbourne/ast/operators.rb
Overview
TODO: document!
Instance Attribute Summary collapse
-
#assign ⇒ Object
Returns the value of attribute assign.
-
#name ⇒ Object
Returns the value of attribute name.
-
#op ⇒ Object
Returns the value of attribute op.
-
#receiver ⇒ Object
Returns the value of attribute receiver.
-
#value ⇒ Object
Returns the value of attribute value.
Attributes inherited from Node
Instance Method Summary collapse
-
#initialize(line, receiver, name, op, value) ⇒ OpAssign2
constructor
A new instance of OpAssign2.
Methods inherited from Node
Constructor Details
#initialize(line, receiver, name, op, value) ⇒ OpAssign2
Returns a new instance of OpAssign2.
86 87 88 89 90 91 92 93 |
# File 'lib/melbourne/ast/operators.rb', line 86 def initialize(line, receiver, name, op, value) @line = line @receiver = receiver @name = name @op = op @value = value @assign = name.to_s[-1] == ?= ? name : :"#{name}=" end |
Instance Attribute Details
#assign ⇒ Object
Returns the value of attribute assign.
82 83 84 |
# File 'lib/melbourne/ast/operators.rb', line 82 def assign @assign end |
#name ⇒ Object
Returns the value of attribute name.
80 81 82 |
# File 'lib/melbourne/ast/operators.rb', line 80 def name @name end |
#op ⇒ Object
Returns the value of attribute op.
78 79 80 |
# File 'lib/melbourne/ast/operators.rb', line 78 def op @op end |
#receiver ⇒ Object
Returns the value of attribute receiver.
76 77 78 |
# File 'lib/melbourne/ast/operators.rb', line 76 def receiver @receiver end |
#value ⇒ Object
Returns the value of attribute value.
84 85 86 |
# File 'lib/melbourne/ast/operators.rb', line 84 def value @value end |