Class: RubyCop::Ruby::IfOp
- Defined in:
- lib/ruby_cop/ruby/operators.rb
Instance Attribute Summary collapse
-
#condition ⇒ Object
readonly
Returns the value of attribute condition.
-
#else_part ⇒ Object
readonly
Returns the value of attribute else_part.
-
#then_part ⇒ Object
readonly
Returns the value of attribute then_part.
Instance Method Summary collapse
-
#initialize(condition, then_part, else_part) ⇒ IfOp
constructor
A new instance of IfOp.
Methods inherited from Node
Constructor Details
#initialize(condition, then_part, else_part) ⇒ IfOp
Returns a new instance of IfOp.
37 38 39 40 41 |
# File 'lib/ruby_cop/ruby/operators.rb', line 37 def initialize(condition, then_part, else_part) @condition = condition @then_part = then_part @else_part = else_part end |
Instance Attribute Details
#condition ⇒ Object (readonly)
Returns the value of attribute condition.
43 44 45 |
# File 'lib/ruby_cop/ruby/operators.rb', line 43 def condition @condition end |
#else_part ⇒ Object (readonly)
Returns the value of attribute else_part.
45 46 47 |
# File 'lib/ruby_cop/ruby/operators.rb', line 45 def else_part @else_part end |
#then_part ⇒ Object (readonly)
Returns the value of attribute then_part.
44 45 46 |
# File 'lib/ruby_cop/ruby/operators.rb', line 44 def then_part @then_part end |