Class: Brut::TUI::Script::Events::PhaseStarted
- Inherits:
-
Events::BaseEvent
- Object
- Events::BaseEvent
- Brut::TUI::Script::Events::PhaseStarted
- Defined in:
- lib/brut/tui/script/events/phase_started.rb
Overview
Fired when a phase starts, but before any steps have executed
Direct Known Subclasses
Instance Method Summary collapse
-
#deconstruct_keys(keys = nil) ⇒ Object
Adds
description,step_number(1-based), andtotal_stepsto the keyword arguments. -
#initialize(description, step_number:, total_steps:) ⇒ PhaseStarted
constructor
A new instance of PhaseStarted.
-
#to_s ⇒ Object
Methods inherited from Events::BaseEvent
#drain_then_exit?, #exit?, handler_method_name
Constructor Details
#initialize(description, step_number:, total_steps:) ⇒ PhaseStarted
Returns a new instance of PhaseStarted.
3 4 5 6 7 |
# File 'lib/brut/tui/script/events/phase_started.rb', line 3 def initialize(description, step_number:, total_steps:) @description = description @step_number = step_number @total_steps = total_steps end |
Instance Method Details
#deconstruct_keys(keys = nil) ⇒ Object
Adds description, step_number (1-based), and total_steps to the keyword arguments.
10 11 12 |
# File 'lib/brut/tui/script/events/phase_started.rb', line 10 def deconstruct_keys(keys=nil) super.merge({ description: @description, step_number: @step_number, total_steps: @total_steps }) end |
#to_s ⇒ Object
13 |
# File 'lib/brut/tui/script/events/phase_started.rb', line 13 def to_s = @description |