Module: Triggerino::ButtonActionable

Included in:
Selector, Trigger
Defined in:
lib/triggerino/button_actionable.rb

Instance Method Summary collapse

Instance Method Details

#bind_eventsObject



9
10
11
12
# File 'lib/triggerino/button_actionable.rb', line 9

def bind_events
  @button.down { button_down }
  @button.up   { button_up  }
end

#button_downObject



14
15
16
# File 'lib/triggerino/button_actionable.rb', line 14

def button_down
  raise 'Not implemented'
end

#button_upObject



18
19
20
# File 'lib/triggerino/button_actionable.rb', line 18

def button_up
  raise 'Not implemented'
end

#initialize(action_list, button) ⇒ Object



3
4
5
6
7
# File 'lib/triggerino/button_actionable.rb', line 3

def initialize action_list, button
  @action_list = action_list
  @button      = button
  bind_events
end