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.
188 189 190 191 |
# File 'lib/madeleine.rb', line 188 def initialize(system) @system = system @in_recovery = false end |
Instance Method Details
#execute(command) ⇒ Object
193 194 195 196 197 198 199 |
# File 'lib/madeleine.rb', line 193 def execute(command) begin command.execute(@system) rescue raise unless @in_recovery end end |
#recovery ⇒ Object
201 202 203 204 205 206 207 208 |
# File 'lib/madeleine.rb', line 201 def recovery begin @in_recovery = true yield ensure @in_recovery = false end end |