Class: Trailblazer::Pro::Trace::Decision
- Inherits:
-
Struct
- Object
- Struct
- Trailblazer::Pro::Trace::Decision
- Defined in:
- lib/trailblazer/pro/trace/decision.rb
Overview
Used in Activity.call monkey-patch.
Instance Attribute Summary collapse
-
#guards ⇒ Object
Returns the value of attribute guards.
Instance Method Summary collapse
-
#call(activity, ctx) ⇒ Object
DISCUSS: signature not stable, yet.
Instance Attribute Details
#guards ⇒ Object
Returns the value of attribute guards
4 5 6 |
# File 'lib/trailblazer/pro/trace/decision.rb', line 4 def guards @guards end |
Instance Method Details
#call(activity, ctx) ⇒ Object
DISCUSS: signature not stable, yet.
5 6 7 8 9 10 11 |
# File 'lib/trailblazer/pro/trace/decision.rb', line 5 def call(activity, ctx) # DISCUSS: signature not stable, yet. guards.each do |guard| result = guard.(activity, ctx) and return result # DISCUSS: {ctx.to_hash}? end false end |