Module: Fusuma::Plugin::Events::Records::TouchRecords::Features::Direction

Included in:
PinchRecord, RotateRecord, SwipeRecord
Defined in:
lib/fusuma/plugin/events/records/touch_records/features/direction.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.prepended(base) ⇒ Object



9
10
11
12
13
# File 'lib/fusuma/plugin/events/records/touch_records/features/direction.rb', line 9

def self.prepended(base)
  base.class_eval do
    attr_reader :direction
  end
end

Instance Method Details

#==(other) ⇒ Object



20
21
22
# File 'lib/fusuma/plugin/events/records/touch_records/features/direction.rb', line 20

def ==(other)
  super(other) && direction == other.direction
end

#initialize(direction:, **args) ⇒ Object



15
16
17
18
# File 'lib/fusuma/plugin/events/records/touch_records/features/direction.rb', line 15

def initialize(direction:, **args)
  super(**args)
  @direction = direction.to_s
end