Class: TouchscreenTaps::Event
- Inherits:
-
Object
- Object
- TouchscreenTaps::Event
- Defined in:
- lib/touchscreen_taps/event.rb
Overview
Parsed Event object
Instance Attribute Summary collapse
-
#finger ⇒ Object
readonly
Returns the value of attribute finger.
-
#move_x ⇒ Object
readonly
Returns the value of attribute move_x.
-
#move_y ⇒ Object
readonly
Returns the value of attribute move_y.
-
#timestamp ⇒ Object
readonly
Returns the value of attribute timestamp.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(type, finger, move_x = nil, move_y = nil) ⇒ Event
constructor
A new instance of Event.
Constructor Details
#initialize(type, finger, move_x = nil, move_y = nil) ⇒ Event
Returns a new instance of Event.
12 13 14 15 16 17 18 |
# File 'lib/touchscreen_taps/event.rb', line 12 def initialize(type, finger, move_x = nil, move_y = nil) @type = type @finger = finger @move_x = move_x @move_y = move_y @timestamp = Process.clock_gettime(Process::CLOCK_MONOTONIC) end |
Instance Attribute Details
#finger ⇒ Object (readonly)
Returns the value of attribute finger.
8 9 10 |
# File 'lib/touchscreen_taps/event.rb', line 8 def finger @finger end |
#move_x ⇒ Object (readonly)
Returns the value of attribute move_x.
9 10 11 |
# File 'lib/touchscreen_taps/event.rb', line 9 def move_x @move_x end |
#move_y ⇒ Object (readonly)
Returns the value of attribute move_y.
10 11 12 |
# File 'lib/touchscreen_taps/event.rb', line 10 def move_y @move_y end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
6 7 8 |
# File 'lib/touchscreen_taps/event.rb', line 6 def @timestamp end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
7 8 9 |
# File 'lib/touchscreen_taps/event.rb', line 7 def type @type end |