Class: RubyCop::Ruby::Unary

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(operator, operand) ⇒ Unary

Returns a new instance of Unary.



7
8
9
10
# File 'lib/ruby_cop/ruby/operators.rb', line 7

def initialize(operator, operand)
  @operator = operator
  @operand  = operand
end

Instance Attribute Details

#operandObject (readonly)

Returns the value of attribute operand.



13
14
15
# File 'lib/ruby_cop/ruby/operators.rb', line 13

def operand
  @operand
end

#operatorObject (readonly)

Returns the value of attribute operator.



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

def operator
  @operator
end