Class: Brut::TUI::Script::Events::ScriptStarted
- Inherits:
-
Events::BaseEvent
- Object
- Events::BaseEvent
- Brut::TUI::Script::Events::ScriptStarted
- Defined in:
- lib/brut/tui/script/events/script_started.rb
Overview
Fired when the script is just starting
Instance Method Summary collapse
-
#deconstruct_keys(keys = nil) ⇒ Object
Adds
phasesas an array of[description,Proc]representing the phases. -
#initialize(phases:) ⇒ ScriptStarted
constructor
A new instance of ScriptStarted.
-
#to_s ⇒ Object
Methods inherited from Events::BaseEvent
#drain_then_exit?, #exit?, handler_method_name
Constructor Details
#initialize(phases:) ⇒ ScriptStarted
Returns a new instance of ScriptStarted.
3 4 5 |
# File 'lib/brut/tui/script/events/script_started.rb', line 3 def initialize(phases:) @phases = phases end |
Instance Method Details
#deconstruct_keys(keys = nil) ⇒ Object
Adds phases as an array of [description,Proc] representing the phases.
You are discouraged from interacting with the Proc objects.
8 9 10 |
# File 'lib/brut/tui/script/events/script_started.rb', line 8 def deconstruct_keys(keys=nil) super.merge({ phases: @phases }) end |
#to_s ⇒ Object
11 |
# File 'lib/brut/tui/script/events/script_started.rb', line 11 def to_s = "Starting" |