Class: comcom::leapmotioncom::leapmotion::leap::Frame
- Inherits:
-
Object
- Object
- comcom::leapmotioncom::leapmotion::leap::Frame
- Defined in:
- lib/reapmotion/core_ext/frame.rb
Constant Summary collapse
- GESTURE_TYPE_MAP =
{ Gesture::Type::TYPE_CIRCLE => CircleGesture, Gesture::Type::TYPE_SWIPE => SwipeGesture, Gesture::Type::TYPE_SCREEN_TAP => ScreenTapGesture, Gesture::Type::TYPE_KEY_TAP => KeyTapGesture, }
Instance Method Summary collapse
Instance Method Details
#gestures ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/reapmotion/core_ext/frame.rb', line 17 def gestures # Original Java path return gestures_original unless block_given? gestures_original.each do |gesture| type = GESTURE_TYPE_MAP[gesture.type] raise ArgumentError.new("unknown type #{gesture.type}") unless type yield type.new(gesture) end end |
#gestures_original ⇒ Object
15 |
# File 'lib/reapmotion/core_ext/frame.rb', line 15 alias gestures_original gestures |