Class: Deskbot::Event::MouseDown
- Inherits:
-
Event
- Object
- Event
- Deskbot::Event::MouseDown
- Defined in:
- lib/deskbot/event.rb
Overview
A mouse button was pressed down. Exposes the pressed #button.
Instance Attribute Summary collapse
-
#button ⇒ Object
readonly
Returns the value of attribute button.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(button:, recorded_at:) ⇒ MouseDown
constructor
A new instance of MouseDown.
Constructor Details
#initialize(button:, recorded_at:) ⇒ MouseDown
Returns a new instance of MouseDown.
87 88 89 90 |
# File 'lib/deskbot/event.rb', line 87 def initialize(button:, recorded_at:) = @recorded_at = recorded_at end |
Instance Attribute Details
#button ⇒ Object (readonly)
Returns the value of attribute button.
85 86 87 |
# File 'lib/deskbot/event.rb', line 85 def end |
Class Method Details
.build(payload) ⇒ Object
92 93 94 |
# File 'lib/deskbot/event.rb', line 92 def self.build(payload) new(button: payload["button"], recorded_at: recorded_at_from(payload)) end |