Class: Madeleine::Executer
- Inherits:
-
Object
- Object
- Madeleine::Executer
- Defined in:
- lib/madeleine.rb
Overview
:nodoc:
Instance Method Summary collapse
- #execute(command) ⇒ Object
-
#initialize(system) ⇒ Executer
constructor
A new instance of Executer.
- #recovery ⇒ Object
Constructor Details
#initialize(system) ⇒ Executer
Returns a new instance of Executer.
182 183 184 185 |
# File 'lib/madeleine.rb', line 182 def initialize(system) @system = system @in_recovery = false end |
Instance Method Details
#execute(command) ⇒ Object
187 188 189 190 191 192 193 |
# File 'lib/madeleine.rb', line 187 def execute(command) begin command.execute(@system) rescue raise unless @in_recovery end end |
#recovery ⇒ Object
195 196 197 198 199 200 201 202 |
# File 'lib/madeleine.rb', line 195 def recovery begin @in_recovery = true yield ensure @in_recovery = false end end |