Class: Brut::TUI::Script::BlockStep
- Defined in:
- lib/brut/tui/script/block_step.rb
Overview
A step whose behavior is a given block of code. Fires Events::StepStarted before the code executes and Events::StepCompleted only if the block completes without an exception being thrown.
Constant Summary
Constants inherited from Step
Instance Attribute Summary
Attributes inherited from Step
Instance Method Summary collapse
-
#initialize(event_loop, description, &block) ⇒ BlockStep
constructor
A new instance of BlockStep.
-
#run! ⇒ Object
Constructor Details
#initialize(event_loop, description, &block) ⇒ BlockStep
Returns a new instance of BlockStep.
6 7 8 9 |
# File 'lib/brut/tui/script/block_step.rb', line 6 def initialize(event_loop, description, &block) super(event_loop, description) @block = block end |