Class: Exlibris::Aleph::TabParser::Base
- Inherits:
-
Object
- Object
- Exlibris::Aleph::TabParser::Base
- Defined in:
- lib/exlibris/aleph/tabs_parser/base.rb
Direct Known Subclasses
PcTabExpFieldExtended, SubLibrary, Tab37, TabSubLibrary, TabWwwItemDesc
Instance Attribute Summary collapse
-
#config_array ⇒ Object
Returns the value of attribute config_array.
-
#config_hash ⇒ Object
Returns the value of attribute config_hash.
-
#file_name ⇒ Object
Returns the value of attribute file_name.
-
#hash_key ⇒ Object
Returns the value of attribute hash_key.
-
#library ⇒ Object
Returns the value of attribute library.
-
#local_file ⇒ Object
Returns the value of attribute local_file.
-
#local_path ⇒ Object
Returns the value of attribute local_path.
-
#pattern ⇒ Object
Returns the value of attribute pattern.
-
#pattern_key ⇒ Object
Returns the value of attribute pattern_key.
Instance Method Summary collapse
-
#initialize(args) ⇒ Base
constructor
A new instance of Base.
- #to_a ⇒ Object
- #to_h ⇒ Object
Constructor Details
#initialize(args) ⇒ Base
Returns a new instance of Base.
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/exlibris/aleph/tabs_parser/base.rb', line 9 def initialize(args) @aleph_library = args[:aleph_library] @aleph_library.downcase! @aleph_file_name = args[:aleph_file_name] @aleph_file_name.downcase! @pattern = args[:pattern] @pattern_key = args[:pattern_key] @hash_key = args[:hash_key] @aleph_file = "#{args[:aleph_mnt_path]}/#{@aleph_library}/tab/#{@aleph_file_name}" end |
Instance Attribute Details
#config_array ⇒ Object
Returns the value of attribute config_array.
7 8 9 |
# File 'lib/exlibris/aleph/tabs_parser/base.rb', line 7 def config_array @config_array end |
#config_hash ⇒ Object
Returns the value of attribute config_hash.
7 8 9 |
# File 'lib/exlibris/aleph/tabs_parser/base.rb', line 7 def config_hash @config_hash end |
#file_name ⇒ Object
Returns the value of attribute file_name.
5 6 7 |
# File 'lib/exlibris/aleph/tabs_parser/base.rb', line 5 def file_name @file_name end |
#hash_key ⇒ Object
Returns the value of attribute hash_key.
7 8 9 |
# File 'lib/exlibris/aleph/tabs_parser/base.rb', line 7 def hash_key @hash_key end |
#library ⇒ Object
Returns the value of attribute library.
5 6 7 |
# File 'lib/exlibris/aleph/tabs_parser/base.rb', line 5 def library @library end |
#local_file ⇒ Object
Returns the value of attribute local_file.
6 7 8 |
# File 'lib/exlibris/aleph/tabs_parser/base.rb', line 6 def local_file @local_file end |
#local_path ⇒ Object
Returns the value of attribute local_path.
6 7 8 |
# File 'lib/exlibris/aleph/tabs_parser/base.rb', line 6 def local_path @local_path end |
#pattern ⇒ Object
Returns the value of attribute pattern.
5 6 7 |
# File 'lib/exlibris/aleph/tabs_parser/base.rb', line 5 def pattern @pattern end |
#pattern_key ⇒ Object
Returns the value of attribute pattern_key.
5 6 7 |
# File 'lib/exlibris/aleph/tabs_parser/base.rb', line 5 def pattern_key @pattern_key end |
Instance Method Details
#to_a ⇒ Object
20 21 22 |
# File 'lib/exlibris/aleph/tabs_parser/base.rb', line 20 def to_a @config_array ||= parse_file.first end |
#to_h ⇒ Object
24 25 26 |
# File 'lib/exlibris/aleph/tabs_parser/base.rb', line 24 def to_h @config_hash ||= parse_file.last end |