Class: Exlibris::Aleph::TabParser::Tab37

Inherits:
Base
  • Object
show all
Defined in:
lib/exlibris/aleph/tabs_parser/tab37.rb

Instance Attribute Summary

Attributes inherited from Base

#config_array, #config_hash, #file_name, #hash_key, #library, #local_file, #local_path, #pattern, #pattern_key

Instance Method Summary collapse

Methods inherited from Base

#to_a, #to_h

Constructor Details

#initialize(args) ⇒ Tab37

Returns a new instance of Tab37.



6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/exlibris/aleph/tabs_parser/tab37.rb', line 6

def initialize(args)
  args[:aleph_file_name] = "tab37"
  args[:pattern] = /^(.{5})\s([0-9#]{2})\s(.{2})\s(.{2})\s([YN#])\s(.{2}.?.?.?)\s?(.{5})?\s?(.{5})?\s?(.{5})?\s?(.{5})?\s?(.{5})?\s?(.{5})?\s?(.{5})?\s?(.{5})?\s?(.{5})?/
  args[:pattern_key] = {
    1  => :sub_library, 
    2  => :item_status, 
    3  => :item_process_status, 
    4  => :patron_status, 
    5  => :availability_status
  }
  args[:hash_key] = :sub_library
  super(args)
end