Class: Deskbot::Event::KeyUp
- Inherits:
-
Event
- Object
- Event
- Deskbot::Event::KeyUp
- Defined in:
- lib/deskbot/event.rb
Overview
A key was released. Exposes the released #key.
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(key:, recorded_at:) ⇒ KeyUp
constructor
A new instance of KeyUp.
Constructor Details
#initialize(key:, recorded_at:) ⇒ KeyUp
Returns a new instance of KeyUp.
73 74 75 76 |
# File 'lib/deskbot/event.rb', line 73 def initialize(key:, recorded_at:) @key = key.to_sym @recorded_at = recorded_at end |
Instance Attribute Details
#key ⇒ Object (readonly)
Returns the value of attribute key.
71 72 73 |
# File 'lib/deskbot/event.rb', line 71 def key @key end |
Class Method Details
.build(payload) ⇒ Object
78 79 80 |
# File 'lib/deskbot/event.rb', line 78 def self.build(payload) new(key: payload["key"], recorded_at: recorded_at_from(payload)) end |