Class: ProconBypassMan::DeviceMouseFinder::USBDevice

Inherits:
Struct
  • Object
show all
Defined in:
lib/procon_bypass_man/support/device_mouse_finder.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#display_nameObject

Returns the value of attribute display_name

Returns:

  • (Object)

    the current value of display_name



2
3
4
# File 'lib/procon_bypass_man/support/device_mouse_finder.rb', line 2

def display_name
  @display_name
end

#event_noObject

Returns the value of attribute event_no

Returns:

  • (Object)

    the current value of 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_pathObject



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

Returns:

  • (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かを判断したい

Returns:

  • (Boolean)


4
5
6
# File 'lib/procon_bypass_man/support/device_mouse_finder.rb', line 4

def mouse?
  !!(display_name =~ /mouse/i)
end