Class: Exlibris::Aleph::Holding

Inherits:
Object
  • Object
show all
Defined in:
lib/exlibris/aleph/holding.rb,
lib/exlibris/aleph/holding/metadata.rb

Defined Under Namespace

Classes: Metadata

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(record_id, id) ⇒ Holding

Returns a new instance of Holding.



5
6
7
8
# File 'lib/exlibris/aleph/holding.rb', line 5

def initialize(record_id, id)
  @record_id = record_id
  @id = id
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



4
5
6
# File 'lib/exlibris/aleph/holding.rb', line 4

def id
  @id
end

#record_idObject (readonly)

Returns the value of attribute record_id.



4
5
6
# File 'lib/exlibris/aleph/holding.rb', line 4

def record_id
  @record_id
end

Instance Method Details

#collectionObject



10
11
12
13
14
15
16
17
# File 'lib/exlibris/aleph/holding.rb', line 10

def collection
  unless client.error?
    @collection ||= collections[admin_library].find do |collection|
      collection.code == collection_code &&
        collection.sub_library == sub_library
    end
  end
end

#metadataObject



19
20
21
# File 'lib/exlibris/aleph/holding.rb', line 19

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