Class: Exlibris::Aleph::Table::Reader::Collections

Inherits:
Base
  • Object
show all
Defined in:
lib/exlibris/aleph/table/reader/collections.rb

Constant Summary collapse

FILENAME =
'tab40.eng'

Instance Attribute Summary

Attributes inherited from Base

#admin_library, #filename

Instance Method Summary collapse

Constructor Details

#initialize(admin_library) ⇒ Collections

Returns a new instance of Collections.



8
9
10
# File 'lib/exlibris/aleph/table/reader/collections.rb', line 8

def initialize(admin_library)
  super(admin_library, FILENAME)
end

Instance Method Details

#allObject



12
13
14
15
16
17
18
19
20
21
# File 'lib/exlibris/aleph/table/reader/collections.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?
      Collection.new(row.code, row.display, sub_library)
    end
  end.compact
end