Class: Exlibris::Aleph::Table::Reader::ItemCirculationPolicies
- Defined in:
- lib/exlibris/aleph/table/reader/item_circulation_policies.rb
Constant Summary collapse
- FILENAME =
'tab15.eng'
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #all ⇒ Object
-
#initialize(admin_library) ⇒ ItemCirculationPolicies
constructor
A new instance of ItemCirculationPolicies.
Constructor Details
#initialize(admin_library) ⇒ ItemCirculationPolicies
Returns a new instance of ItemCirculationPolicies.
8 9 10 |
# File 'lib/exlibris/aleph/table/reader/item_circulation_policies.rb', line 8 def initialize(admin_library) super(admin_library, FILENAME) end |
Instance Method Details
#all ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/exlibris/aleph/table/reader/item_circulation_policies.rb', line 12 def all rows.map do |row| sub_library = sub_libraries.find do |sub_library| sub_library.code == row.sub_library_code end unless sub_library.nil? status = Aleph::Item::Status.new(row.item_status_code) processing_status = Aleph::Item::ProcessingStatus.new(row.item_processing_status_code) identifier = Aleph::Item::CirculationPolicy::Identifier.new(status, processing_status, sub_library) display_mask = item_display_masks[admin_library].find do |item_display_mask| item_display_mask.value == row.display end mask = (display_mask.nil?) ? nil : display_mask.mask display = Aleph::Item::CirculationPolicy::Display.new(row.display, mask) privileges = Aleph::Item::CirculationPolicy::Privileges.new(row) Aleph::Item::CirculationPolicy.new(identifier, display, privileges) end end.compact end |