Class: Deskbot::Event::MouseUp

Inherits:
Event
  • Object
show all
Defined in:
lib/deskbot/event.rb

Overview

A mouse button was released. Exposes the released #button.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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 = 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
  @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