Sha256: d775863f485ab9e497016042b15743455eac841fc8321077bb0e0463f581e4f5

Contents?: true

Size: 420 Bytes

Versions: 4

Compression:

Stored size: 420 Bytes

Contents

# frozen_string_literal: true

module Trusona
  module Workers
    #
    ## Handles finding Devices
    class DeviceFinder
      def initialize(service: Trusona::Services::DevicesService.new)
        @service = service
      end

      def find(id = nil)
        raise(ArgumentError, 'A device identifier is required.') unless id

        @service.get(Trusona::Resources::Device.new(id: id))
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
trusona-2.5.3 lib/trusona/workers/device_finder.rb
trusona-2.5.2 lib/trusona/workers/device_finder.rb
trusona-2.5.1 lib/trusona/workers/device_finder.rb
trusona-2.5.0 lib/trusona/workers/device_finder.rb