Class: Cel::Condition
- Inherits:
-
Object
- Object
- Cel::Condition
- Defined in:
- lib/cel/ast/elements.rb
Instance Attribute Summary collapse
-
#else ⇒ Object
readonly
Returns the value of attribute else.
-
#if ⇒ Object
readonly
Returns the value of attribute if.
-
#then ⇒ Object
readonly
Returns the value of attribute then.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(if_, then_, else_) ⇒ Condition
constructor
A new instance of Condition.
Constructor Details
#initialize(if_, then_, else_) ⇒ Condition
Returns a new instance of Condition.
578 579 580 581 582 |
# File 'lib/cel/ast/elements.rb', line 578 def initialize(if_, then_, else_) @if = if_ @then = then_ @else = else_ end |
Instance Attribute Details
#else ⇒ Object (readonly)
Returns the value of attribute else.
576 577 578 |
# File 'lib/cel/ast/elements.rb', line 576 def else @else end |
#if ⇒ Object (readonly)
Returns the value of attribute if.
576 577 578 |
# File 'lib/cel/ast/elements.rb', line 576 def if @if end |
#then ⇒ Object (readonly)
Returns the value of attribute then.
576 577 578 |
# File 'lib/cel/ast/elements.rb', line 576 def then @then end |
Instance Method Details
#==(other) ⇒ Object
584 585 586 |
# File 'lib/cel/ast/elements.rb', line 584 def ==(other) other.is_a?(Condition) && @if == other.if && @then == other.then && @else == other.else end |