Class: Exlibris::Aleph::Table::Reader::SubLibraries

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

Constant Summary collapse

ADMIN_LIBRARY =
AdminLibrary.new('alephe')
FILENAME =
'tab_sub_library.eng'

Instance Attribute Summary

Attributes inherited from Base

#admin_library, #filename

Instance Method Summary collapse

Constructor Details

#initializeSubLibraries

Returns a new instance of SubLibraries.



9
10
11
# File 'lib/exlibris/aleph/table/reader/sub_libraries.rb', line 9

def initialize
  super(ADMIN_LIBRARY, FILENAME)
end

Instance Method Details

#allObject



17
18
19
20
21
22
# File 'lib/exlibris/aleph/table/reader/sub_libraries.rb', line 17

def all
  rows.map do |row|
    admin_library = AdminLibrary.new(row.admin_library_code)
    SubLibrary.new(row.code, row.display, admin_library)
  end
end

#rowsObject



13
14
15
# File 'lib/exlibris/aleph/table/reader/sub_libraries.rb', line 13

def rows
  @rows ||= super.reject { |row| irrelevant_codes.include?(row.code) }
end