Class: Stf::GetKeysInteractor
- Inherits:
-
Object
- Object
- Stf::GetKeysInteractor
- Includes:
- ADB, Log
- Defined in:
- lib/stf/interactor/get_keys_interactor.rb
Instance Method Summary collapse
Methods included from Log
Instance Method Details
#execute ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/stf/interactor/get_keys_interactor.rb', line 13 def execute devices = DI[:stf].get_devices if devices.nil? || (devices.is_a?(Array) && devices.empty?) logger.info 'No devices connected to STF' return [] end devices .map {|d| Device.new(d)} .flat_map {|d| d.getKeys} .uniq .sort end |