Class: RemoveAllUserDevicesInteractor

Inherits:
Object
  • Object
show all
Defined in:
lib/stf/interactor/remove_all_user_devices_interactor.rb

Instance Method Summary collapse

Constructor Details

#initialize(stf) ⇒ RemoveAllUserDevicesInteractor

Returns a new instance of RemoveAllUserDevicesInteractor.



3
4
5
# File 'lib/stf/interactor/remove_all_user_devices_interactor.rb', line 3

def initialize(stf)
  @stf = stf
end

Instance Method Details

#executeObject



7
8
9
10
# File 'lib/stf/interactor/remove_all_user_devices_interactor.rb', line 7

def execute
  devices = @stf.get_user_devices
  devices.each { |d| @stf.remove_device d.serial }
end