Class: Brut::TUI::Script::Events::ScriptStarted

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

Overview

Fired when the script is just starting

Instance Method Summary collapse

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_sObject



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

def to_s = "Starting"