Class: RubyCop::Ruby::Unary
- Defined in:
- lib/ruby_cop/ruby/operators.rb
Instance Attribute Summary collapse
-
#operand ⇒ Object
readonly
Returns the value of attribute operand.
-
#operator ⇒ Object
readonly
Returns the value of attribute operator.
Instance Method Summary collapse
-
#initialize(operator, operand) ⇒ Unary
constructor
A new instance of Unary.
Methods inherited from Node
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
#operand ⇒ Object (readonly)
Returns the value of attribute operand.
13 14 15 |
# File 'lib/ruby_cop/ruby/operators.rb', line 13 def operand @operand end |
#operator ⇒ Object (readonly)
Returns the value of attribute operator.
12 13 14 |
# File 'lib/ruby_cop/ruby/operators.rb', line 12 def operator @operator end |