Class: Brut::TUI::Script::Events::ExecutingCommand
- Inherits:
-
Events::BaseEvent
- Object
- Events::BaseEvent
- Brut::TUI::Script::Events::ExecutingCommand
- Defined in:
- lib/brut/tui/script/events/executing_command.rb
Overview
Fired when a command is executed (this also serves as a base class for the results of such execution).
Direct Known Subclasses
Instance Method Summary collapse
-
#deconstruct_keys(keys = nil) ⇒ Object
Includes
descriptionandcommandin the keyword arguments. -
#initialize(step:) ⇒ ExecutingCommand
constructor
A new instance of ExecutingCommand.
Methods inherited from Events::BaseEvent
#drain_then_exit?, #exit?, handler_method_name
Constructor Details
#initialize(step:) ⇒ ExecutingCommand
Returns a new instance of ExecutingCommand.
4 5 6 |
# File 'lib/brut/tui/script/events/executing_command.rb', line 4 def initialize(step:) @step = step end |
Instance Method Details
#deconstruct_keys(keys = nil) ⇒ Object
Includes description and command in the keyword arguments
9 10 11 |
# File 'lib/brut/tui/script/events/executing_command.rb', line 9 def deconstruct_keys(keys=nil) super.merge({ description: @step.description, command: @step.command }) end |