Class: ManageIQ::Floe::Workflow::ChoiceRule::Boolean
- Inherits:
-
ManageIQ::Floe::Workflow::ChoiceRule
- Object
- ManageIQ::Floe::Workflow::ChoiceRule
- ManageIQ::Floe::Workflow::ChoiceRule::Boolean
- Defined in:
- lib/manageiq/floe/workflow/choice_rule/boolean.rb
Instance Attribute Summary
Attributes inherited from ManageIQ::Floe::Workflow::ChoiceRule
Instance Method Summary collapse
Methods inherited from ManageIQ::Floe::Workflow::ChoiceRule
Constructor Details
This class inherits a constructor from ManageIQ::Floe::Workflow::ChoiceRule
Instance Method Details
#true?(context, input) ⇒ Boolean
8 9 10 11 12 13 14 15 16 |
# File 'lib/manageiq/floe/workflow/choice_rule/boolean.rb', line 8 def true?(context, input) if payload.key?("Not") !ChoiceRule.true?(payload["Not"], context, input) elsif payload.key?("And") payload["And"].all? { |choice| ChoiceRule.true?(choice, context, input) } else payload["Or"].any? { |choice| ChoiceRule.true?(choice, context, input) } end end |