Sha256: 4a5868303757b900f9318956bb178cd5f51859c9a4cc950973e102a794d4c832

Contents?: true

Size: 565 Bytes

Versions: 1

Compression:

Stored size: 565 Bytes

Contents

require "nokogiri"
require "skala/adapter/get_user_former_loans"
require_relative "../aleph_adapter"
require_relative "./get_user_loans"

class Skala::AlephAdapter::GetUserFormerLoans < Skala::Adapter::GetUserFormerLoans
  def call(username, options = {})
    get_user_loans_result = get_user_loans(username, type: :history)

    self.class::Result.new(
      former_loans: get_user_loans_result.loans,
      source: get_user_loans_result.source
    )
  end

  private

  def get_user_loans(*args)
    adapter.class::GetUserLoans.new(adapter).call(*args)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
skala-1.1.0 lib/skala/aleph_adapter/get_user_former_loans.rb