Class: RubyCop::Ruby::Assignment
- Defined in:
- lib/ruby_cop/ruby/assignment.rb
Direct Known Subclasses
ClassVariableAssignment, ConstantAssignment, GlobalVariableAssignment, InstanceVariableAssignment, LocalVariableAssignment, MultiAssignment
Instance Attribute Summary collapse
-
#lvalue ⇒ Object
readonly
Returns the value of attribute lvalue.
-
#operator ⇒ Object
readonly
Returns the value of attribute operator.
-
#rvalue ⇒ Object
readonly
Returns the value of attribute rvalue.
Instance Method Summary collapse
-
#initialize(lvalue, rvalue, operator) ⇒ Assignment
constructor
A new instance of Assignment.
Methods inherited from Node
Constructor Details
#initialize(lvalue, rvalue, operator) ⇒ Assignment
Returns a new instance of Assignment.
4 5 6 7 8 |
# File 'lib/ruby_cop/ruby/assignment.rb', line 4 def initialize(lvalue, rvalue, operator) @lvalue = lvalue @rvalue = rvalue @operator = operator end |
Instance Attribute Details
#lvalue ⇒ Object (readonly)
Returns the value of attribute lvalue.
10 11 12 |
# File 'lib/ruby_cop/ruby/assignment.rb', line 10 def lvalue @lvalue end |
#operator ⇒ Object (readonly)
Returns the value of attribute operator.
12 13 14 |
# File 'lib/ruby_cop/ruby/assignment.rb', line 12 def operator @operator end |
#rvalue ⇒ Object (readonly)
Returns the value of attribute rvalue.
11 12 13 |
# File 'lib/ruby_cop/ruby/assignment.rb', line 11 def rvalue @rvalue end |