Module: AmazingActivist::Irresistible
- Includes:
- Contractable, Rescuable
- Included in:
- Base
- Defined in:
- lib/amazing_activist/irresistible.rb
Instance Method Summary collapse
-
#call ⇒ Object
Initialize and call activity.
Instance Method Details
#call ⇒ Object
Initialize and call activity.
17 18 19 20 21 22 23 24 25 26 |
# File 'lib/amazing_activist/irresistible.rb', line 17 def call(...) activity = new(...) outcome = irresistible_call(activity) unless outcome.is_a?(Outcome::Failure) || outcome.is_a?(Outcome::Success) return activity.instance_exec(outcome, &broken_contract_handler) end outcome end |