Class: Brut::TUI::Events::Tick
- Defined in:
- lib/brut/tui/events/tick.rb
Overview
An event that indicates time has passed.
Instance Method Summary collapse
-
#deconstruct_keys(keys = nil) ⇒ Object
Includes
elapsed_time, which is the number of seconds since the event loop started. -
#initialize(elapsed_time) ⇒ Tick
constructor
A new instance of Tick.
Methods inherited from BaseEvent
#drain_then_exit?, #exit?, handler_method_name
Constructor Details
#initialize(elapsed_time) ⇒ Tick
Returns a new instance of Tick.
3 4 5 |
# File 'lib/brut/tui/events/tick.rb', line 3 def initialize(elapsed_time) @elapsed_time = elapsed_time end |
Instance Method Details
#deconstruct_keys(keys = nil) ⇒ Object
Includes elapsed_time, which is the number of seconds since the
event loop started.
9 10 11 |
# File 'lib/brut/tui/events/tick.rb', line 9 def deconstruct_keys(keys=nil) super.merge({ elapsed_time: @elapsed_time }) end |