Class: RubyCop::Ruby::Binary

Inherits:
Operator show all
Defined in:
lib/ruby_cop/ruby/operators.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Node

#accept

Constructor Details

#initialize(lvalue, rvalue, operator) ⇒ Binary

Returns a new instance of Binary.



21
22
23
24
25
# File 'lib/ruby_cop/ruby/operators.rb', line 21

def initialize(lvalue, rvalue, operator)
  @lvalue   = lvalue
  @rvalue   = rvalue
  @operator = operator
end

Instance Attribute Details

#lvalueObject (readonly)

Returns the value of attribute lvalue.



27
28
29
# File 'lib/ruby_cop/ruby/operators.rb', line 27

def lvalue
  @lvalue
end

#operatorObject (readonly)

Returns the value of attribute operator.



29
30
31
# File 'lib/ruby_cop/ruby/operators.rb', line 29

def operator
  @operator
end

#rvalueObject (readonly)

Returns the value of attribute rvalue.



28
29
30
# File 'lib/ruby_cop/ruby/operators.rb', line 28

def rvalue
  @rvalue
end