Class: TouchscreenTaps::TouchscreenDevice
- Inherits:
-
Object
- Object
- TouchscreenTaps::TouchscreenDevice
- Defined in:
- lib/touchscreen_taps/touchscreen_device.rb
Overview
represents a physical input device (e.g touchscreen)
Constant Summary collapse
- REQUIRED_CAPABILITY =
'touch'
Instance Attribute Summary collapse
-
#kernel ⇒ Object
readonly
Returns the value of attribute kernel.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(kernel) ⇒ TouchscreenDevice
constructor
A new instance of TouchscreenDevice.
Constructor Details
#initialize(kernel) ⇒ TouchscreenDevice
Returns a new instance of TouchscreenDevice.
9 10 11 |
# File 'lib/touchscreen_taps/touchscreen_device.rb', line 9 def initialize(kernel) @kernel = kernel end |
Instance Attribute Details
#kernel ⇒ Object (readonly)
Returns the value of attribute kernel.
7 8 9 |
# File 'lib/touchscreen_taps/touchscreen_device.rb', line 7 def kernel @kernel end |
Class Method Details
.select_from(devices) ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/touchscreen_taps/touchscreen_device.rb', line 14 def select_from(devices) devices.map do |device| next unless capable?(device) kernel = kernel_path(device) new(kernel) unless kernel.nil? end.compact end |