Class: Exlibris::Aleph::API::Reader::Patron::Record::Item::Hold

Inherits:
Base
  • Object
show all
Defined in:
lib/exlibris/aleph/api/reader/patron/record/item/hold.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#root

Instance Method Summary collapse

Constructor Details

#initialize(root) ⇒ Hold

Returns a new instance of Hold.



12
13
14
15
# File 'lib/exlibris/aleph/api/reader/patron/record/item/hold.rb', line 12

def initialize(root)
  super(root)
  @allowed = hold['allowed']
end

Instance Attribute Details

#allowedObject (readonly)

Returns the value of attribute allowed.



10
11
12
# File 'lib/exlibris/aleph/api/reader/patron/record/item/hold.rb', line 10

def allowed
  @allowed
end

Instance Method Details

#pickup_locationsObject



17
18
19
20
21
22
23
# File 'lib/exlibris/aleph/api/reader/patron/record/item/hold.rb', line 17

def pickup_locations
  @pickup_locations ||= pickup_location.map do |location|
    code = location['code']
    display = location['__content__']
    PickupLocation.new(code, display)
  end
end