Sha256: b1054a9d10831f317e05cb80f242e14fbe2758a811f358e92ba048c4a7102e2b

Contents?: true

Size: 645 Bytes

Versions: 4

Compression:

Stored size: 645 Bytes

Contents

require 'di'
require 'ADB'

require 'stf/client'
require 'stf/log/log'
require 'stf/interactor/stop_debug_session_interactor'
require 'stf/model/device_list'

module Stf
  class StopAllDebugSessionsInteractor
    include Log
    include ADB

    # byFilter:
    def execute(options = {})
      DI[:demonizer].kill unless options[:nokill]

      stf_devices = DeviceList.new(DI[:stf].get_user_devices)

      stf_devices = stf_devices.by_filter options[:byFilter] if options[:byFilter]

      pending_disconnect = stf_devices.as_connect_url_list

      pending_disconnect.each {|d| DI[:stop_debug_session_interactor].execute d}
    end
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
smartdust-client-1.2.0 lib/stf/interactor/stop_all_debug_sessions_interactor.rb
smartdust-client-1.1.0 lib/stf/interactor/stop_all_debug_sessions_interactor.rb
stf-client-0.3.0 lib/stf/interactor/stop_all_debug_sessions_interactor.rb
stf-client-0.3.0.pre.rc.12 lib/stf/interactor/stop_all_debug_sessions_interactor.rb