Class: RCrewAI::Flow::Trigger
- Inherits:
-
Struct
- Object
- Struct
- RCrewAI::Flow::Trigger
- Defined in:
- lib/rcrewai/flow.rb
Overview
--- Trigger descriptors -------------------------------------------------
Instance Attribute Summary collapse
-
#mode ⇒ Object
Returns the value of attribute mode.
-
#names ⇒ Object
Returns the value of attribute names.
Instance Method Summary collapse
Instance Attribute Details
#mode ⇒ Object
Returns the value of attribute mode
31 32 33 |
# File 'lib/rcrewai/flow.rb', line 31 def mode @mode end |
#names ⇒ Object
Returns the value of attribute names
31 32 33 |
# File 'lib/rcrewai/flow.rb', line 31 def names @names end |
Instance Method Details
#satisfied_by?(completed) ⇒ Boolean
32 33 34 35 36 37 |
# File 'lib/rcrewai/flow.rb', line 32 def satisfied_by?(completed) case mode when :single, :or then names.any? { |n| completed.include?(n) } when :and then names.all? { |n| completed.include?(n) } end end |