Class: Fusuma::Plugin::Events::Records::GestureRecord

Inherits:
Record
  • Object
show all
Defined in:
lib/fusuma/plugin/events/records/gesture_record.rb

Overview

Gesture Record

Defined Under Namespace

Classes: Delta

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Record

#type

Methods inherited from Base

#config_index, #config_param_types, #config_params, inherited, plugins, #shutdown

Constructor Details

#initialize(status:, gesture:, finger:, delta:) ⇒ GestureRecord

Returns a new instance of GestureRecord.

Parameters:



25
26
27
28
29
30
31
# File 'lib/fusuma/plugin/events/records/gesture_record.rb', line 25

def initialize(status:, gesture:, finger:, delta:)
  super()
  @status = status
  @gesture = gesture
  @finger = finger.to_i
  @delta = delta
end

Instance Attribute Details

#deltaObject (readonly)

define gesture format



12
13
14
# File 'lib/fusuma/plugin/events/records/gesture_record.rb', line 12

def delta
  @delta
end

#fingerObject (readonly)

define gesture format



12
13
14
# File 'lib/fusuma/plugin/events/records/gesture_record.rb', line 12

def finger
  @finger
end

#gestureObject (readonly)

define gesture format



12
13
14
# File 'lib/fusuma/plugin/events/records/gesture_record.rb', line 12

def gesture
  @gesture
end

#statusObject (readonly)

define gesture format



12
13
14
# File 'lib/fusuma/plugin/events/records/gesture_record.rb', line 12

def status
  @status
end

Instance Method Details

#to_sObject



33
34
35
# File 'lib/fusuma/plugin/events/records/gesture_record.rb', line 33

def to_s
  "#{@gesture}, Finger: #{@finger}, Status: #{@status}"
end