Class: Rubycop::Analyzer::Ruby::IfOp
- Defined in:
- lib/rubycop/analyzer/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.
38 39 40 41 42 |
# File 'lib/rubycop/analyzer/ruby/operators.rb', line 38 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.
44 45 46 |
# File 'lib/rubycop/analyzer/ruby/operators.rb', line 44 def condition @condition end |
#else_part ⇒ Object (readonly)
Returns the value of attribute else_part.
46 47 48 |
# File 'lib/rubycop/analyzer/ruby/operators.rb', line 46 def else_part @else_part end |
#then_part ⇒ Object (readonly)
Returns the value of attribute then_part.
45 46 47 |
# File 'lib/rubycop/analyzer/ruby/operators.rb', line 45 def then_part @then_part end |