Class: Rubycop::Analyzer::Ruby::Unary

Inherits:
Operator show all
Defined in:
lib/rubycop/analyzer/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.



8
9
10
11
# File 'lib/rubycop/analyzer/ruby/operators.rb', line 8

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

Instance Attribute Details

#operandObject (readonly)

Returns the value of attribute operand.



14
15
16
# File 'lib/rubycop/analyzer/ruby/operators.rb', line 14

def operand
  @operand
end

#operatorObject (readonly)

Returns the value of attribute operator.



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

def operator
  @operator
end