Class: Brut::TUI::Script::Events::StepStarted

Inherits:
Events::BaseEvent show all
Defined in:
lib/brut/tui/script/events/step_started.rb

Overview

Fired when a step is about to execute

Direct Known Subclasses

StepCompleted

Instance Method Summary collapse

Methods inherited from Events::BaseEvent

#drain_then_exit?, #exit?, handler_method_name

Constructor Details

#initialize(step:) ⇒ StepStarted

Returns a new instance of StepStarted.



3
4
5
# File 'lib/brut/tui/script/events/step_started.rb', line 3

def initialize(step:)
  @step = step
end

Instance Method Details

#deconstruct_keys(keys = nil) ⇒ Object

Adds description to the keyword arguments



8
9
10
# File 'lib/brut/tui/script/events/step_started.rb', line 8

def deconstruct_keys(keys=nil)
  super.merge({ description: @step.description })
end

#to_sObject



11
# File 'lib/brut/tui/script/events/step_started.rb', line 11

def to_s = @description