Sha256: 4b2be204df3b5fcf6741d1cefa742550e2ab1ad7a30b6a09afab8d54ec8364cf

Contents?: true

Size: 663 Bytes

Versions: 4

Compression:

Stored size: 663 Bytes

Contents

module RSqoot
  module Provider
    # Retrieve a list of providers base on the following parameters
    #
    # @return [RSqoot::SqootProvider]
    def providers(options={})
      options = update_by_expire_time options
      query = options.delete(:query)
      if providers_not_latest?(options)
        @rsqoot_providers = get('providers', options, SqootProvider)
        @rsqoot_providers = @rsqoot_providers.providers.map(&:provider) if @rsqoot_providers
      end
      result = query.present? ? query_providers(query) : @rsqoot_providers
      logger({uri: sqoot_query_uri, records: result, type: 'providers', opts: options})
      result
    end

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rsqoot-0.5.5 lib/rsqoot/provider.rb
rsqoot-0.5.4 lib/rsqoot/provider.rb
rsqoot-0.5.3 lib/rsqoot/provider.rb
rsqoot-0.5.2 lib/rsqoot/provider.rb