Class: Contracto::SystemActionChain
- Inherits:
-
Object
- Object
- Contracto::SystemActionChain
- Defined in:
- lib/contracto/system_action.rb,
lib/contracto/system_action_chain.rb
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(*actions) ⇒ SystemActionChain
constructor
A new instance of SystemActionChain.
Constructor Details
#initialize(*actions) ⇒ SystemActionChain
Returns a new instance of SystemActionChain.
82 83 84 85 |
# File 'lib/contracto/system_action.rb', line 82 def initialize(*actions) @actions = actions @finished_actions = [] end |
Instance Method Details
#execute ⇒ Object
87 88 89 90 91 92 |
# File 'lib/contracto/system_action.rb', line 87 def execute perform_actions and true rescue StandardError => e revert_actions and false raise e end |