Class: Fusuma::EventTrigger
- Inherits:
-
Object
- Object
- Fusuma::EventTrigger
- Defined in:
- lib/fusuma/event_trigger.rb
Overview
manage actions
Instance Attribute Summary collapse
-
#action_type ⇒ Object
readonly
Returns the value of attribute action_type.
-
#direction ⇒ Object
readonly
Returns the value of attribute direction.
-
#finger ⇒ Object
readonly
Returns the value of attribute finger.
Instance Method Summary collapse
-
#initialize(finger, direction, action_type) ⇒ EventTrigger
constructor
A new instance of EventTrigger.
- #send_command ⇒ Object
Constructor Details
#initialize(finger, direction, action_type) ⇒ EventTrigger
Returns a new instance of EventTrigger.
4 5 6 7 8 |
# File 'lib/fusuma/event_trigger.rb', line 4 def initialize(finger, direction, action_type) @finger = finger.to_i @direction = direction @action_type = action_type end |
Instance Attribute Details
#action_type ⇒ Object (readonly)
Returns the value of attribute action_type.
9 10 11 |
# File 'lib/fusuma/event_trigger.rb', line 9 def action_type @action_type end |
#direction ⇒ Object (readonly)
Returns the value of attribute direction.
9 10 11 |
# File 'lib/fusuma/event_trigger.rb', line 9 def direction @direction end |
#finger ⇒ Object (readonly)
Returns the value of attribute finger.
9 10 11 |
# File 'lib/fusuma/event_trigger.rb', line 9 def finger @finger end |
Instance Method Details
#send_command ⇒ Object
11 12 13 14 |
# File 'lib/fusuma/event_trigger.rb', line 11 def send_command MultiLogger.info("trigger event: #{command}") exec_command(command) end |