Sha256: 13f85b5f10bccb1e137804ac869c9cd7b8663d48e8e54bc34d41a3a4f9b77693

Contents?: true

Size: 941 Bytes

Versions: 1

Compression:

Stored size: 941 Bytes

Contents

require "active_support"
require "active_support/core_ext"
require "skala/adapter"

class Skala::PrimoAdapter < Skala::Adapter
  require_relative "./primo_adapter/get_records"
  require_relative "./primo_adapter/search"
  require_relative "./primo_adapter/soap_api"

  attr_accessor :institution
  attr_accessor :languages
  attr_accessor :locations
  attr_accessor :on_campus
  attr_accessor :soap_api_url
  attr_accessor :timeout

  def initialize(options = {})
    HashWithIndifferentAccess.new(options).try do |_options|
      self.institution  = _options[:institution]
      self.languages    = _options[:languages]
      self.locations    = _options[:locations]
      self.on_campus    = _options[:on_campus]
      self.soap_api_url = _options[:soap_api_url] 
      self.timeout      = _options[:timeout]
    end
  end

  #
  # internal api between adapter and operations
  #
  def soap_api
    self.class::SoapApi.new(self)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
skala-1.1.0 lib/skala/primo_adapter.rb