Class: ProconBypassMan::DeviceMouseFinder::USBDevice
- Inherits:
-
Struct
- Object
- Struct
- ProconBypassMan::DeviceMouseFinder::USBDevice
- Defined in:
- lib/procon_bypass_man/support/device_mouse_finder.rb
Instance Attribute Summary collapse
-
#display_name ⇒ Object
Returns the value of attribute display_name.
-
#event_no ⇒ Object
Returns the value of attribute event_no.
Instance Method Summary collapse
- #event_device_path ⇒ Object
- #keyboard? ⇒ Boolean
-
#mouse? ⇒ Boolean
TODO bInterfaceProtocolの値を見てmouseかを判断したい.
Instance Attribute Details
#display_name ⇒ Object
Returns the value of attribute display_name
2 3 4 |
# File 'lib/procon_bypass_man/support/device_mouse_finder.rb', line 2 def display_name @display_name end |
#event_no ⇒ Object
Returns the value of attribute event_no
2 3 4 |
# File 'lib/procon_bypass_man/support/device_mouse_finder.rb', line 2 def event_no @event_no end |
Instance Method Details
#event_device_path ⇒ Object
12 13 14 |
# File 'lib/procon_bypass_man/support/device_mouse_finder.rb', line 12 def event_device_path "/dev/input/#{event_no}" end |
#keyboard? ⇒ Boolean
8 9 10 |
# File 'lib/procon_bypass_man/support/device_mouse_finder.rb', line 8 def keyboard? !!(display_name =~ /keyboard/i) end |
#mouse? ⇒ Boolean
TODO bInterfaceProtocolの値を見てmouseかを判断したい
4 5 6 |
# File 'lib/procon_bypass_man/support/device_mouse_finder.rb', line 4 def mouse? !!(display_name =~ /mouse/i) end |