Sha256: e58abc32a9726887c806a82bee661a6ecfb2a791d9c43f9b42a25d3b73ba7125

Contents?: true

Size: 534 Bytes

Versions: 3

Compression:

Stored size: 534 Bytes

Contents

module Exlibris
  module Aleph
    module Table
      module Reader
        module Row
          class Base
            def self.attr_ordered_keys(*ordered_keys)
              ordered_keys.each_with_index do |key, index|
                define_method(key) do
                  eval("@#{key} ||= data[#{index}].strip")
                end
              end
            end

            attr_reader :data

            def initialize(data)
              @data = data
            end
          end
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
exlibris-aleph-2.0.4 lib/exlibris/aleph/table/reader/row/base.rb
exlibris-aleph-2.0.3 lib/exlibris/aleph/table/reader/row/base.rb
exlibris-aleph-2.0.0 lib/exlibris/aleph/table/reader/row/base.rb