Class: RubyCop::Ruby::Assignment

Inherits:
Node
  • Object
show all
Defined in:
lib/ruby_cop/ruby/assignment.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Node

#accept

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

#lvalueObject (readonly)

Returns the value of attribute lvalue.



10
11
12
# File 'lib/ruby_cop/ruby/assignment.rb', line 10

def lvalue
  @lvalue
end

#operatorObject (readonly)

Returns the value of attribute operator.



12
13
14
# File 'lib/ruby_cop/ruby/assignment.rb', line 12

def operator
  @operator
end

#rvalueObject (readonly)

Returns the value of attribute rvalue.



11
12
13
# File 'lib/ruby_cop/ruby/assignment.rb', line 11

def rvalue
  @rvalue
end