Sha256: 453c3ba8b7b0e6bc5107845d0bfa2d46200541474153eb5e6b1d274933fd465e

Contents?: true

Size: 769 Bytes

Versions: 10

Compression:

Stored size: 769 Bytes

Contents

module Exlibris
  module Aleph
    module TabParser
      class SubLibrary < Exlibris::Aleph::TabParser::Base
        def initialize(args)
          super(args)
          @aleph_sub_library_key = :sub_library
        end
    
        def to_h
          a = self.to_a
          @config_hash = {}
          sl_a = a.collect do |i|
            i[@aleph_sub_library_key]
          end
          sl_a.uniq!
          sl_a.each do |sl|
            sl_hash = {}
            a.each do |i|
              isl = i[@aleph_sub_library_key]
              if isl.strip == sl.strip
                sl_hash[i[@hash_key]] = i
              end
            end
            @config_hash["#{sl}"] = sl_hash
          end
          return @config_hash
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
exlibris-aleph-1.1.0 lib/exlibris/aleph/tabs_parser/sub_library.rb
exlibris-aleph-1.0.8 lib/exlibris/aleph/tabs_parser/sub_library.rb
exlibris-aleph-1.0.7 lib/exlibris/aleph/tabs_parser/sub_library.rb
exlibris-aleph-1.0.6 lib/exlibris/aleph/tabs_parser/sub_library.rb
exlibris-aleph-1.0.5 lib/exlibris/aleph/tabs_parser/sub_library.rb
exlibris-aleph-1.0.4 lib/exlibris/aleph/tabs_parser/sub_library.rb
exlibris-aleph-1.0.3 lib/exlibris/aleph/tabs_parser/sub_library.rb
exlibris-aleph-1.0.2 lib/exlibris/aleph/tabs_parser/sub_library.rb
exlibris-aleph-1.0.1 lib/exlibris/aleph/tabs_parser/sub_library.rb
exlibris-aleph-1.0.0 lib/exlibris/aleph/tabs_parser/sub_library.rb