Class: Deskbot::Event::MouseUp
- Inherits:
-
Event
- Object
- Event
- Deskbot::Event::MouseUp
- Defined in:
- lib/deskbot/event.rb
Overview
A mouse button was released. Exposes the released #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:) ⇒ MouseUp
constructor
A new instance of MouseUp.
Constructor Details
#initialize(button:, recorded_at:) ⇒ MouseUp
Returns a new instance of MouseUp.
101 102 103 104 |
# File 'lib/deskbot/event.rb', line 101 def initialize(button:, recorded_at:) @button = @recorded_at = recorded_at end |
Instance Attribute Details
#button ⇒ Object (readonly)
Returns the value of attribute button.
99 100 101 |
# File 'lib/deskbot/event.rb', line 99 def @button end |
Class Method Details
.build(payload) ⇒ Object
106 107 108 |
# File 'lib/deskbot/event.rb', line 106 def self.build(payload) new(button: payload["button"], recorded_at: recorded_at_from(payload)) end |