Sha256: cfdef9137c34f34b4ef57166971b0668e914e00ee73e2df78c99947b5301b581

Contents?: true

Size: 487 Bytes

Versions: 3

Compression:

Stored size: 487 Bytes

Contents

module Exlibris
  module Aleph
    class Record

      attr_reader :id

      def initialize(id)
        @id = id
      end

      def metadata
        @metadata ||= Metadata.new(client.to_xml) unless client.error?
      end

      def holdings
        @holdings ||= Holdings.new(id).to_a
      end

      def items
        @items ||= Items.new(id).to_a
      end

      private
      def client
        @client ||= API::Client::Record.new(id, {view: 'full'})
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
exlibris-aleph-2.0.4 lib/exlibris/aleph/record.rb
exlibris-aleph-2.0.3 lib/exlibris/aleph/record.rb
exlibris-aleph-2.0.0 lib/exlibris/aleph/record.rb