Class: Exlibris::Aleph::Table::Reader::Row::Base

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Base

Returns a new instance of Base.



17
18
19
# File 'lib/exlibris/aleph/table/reader/row/base.rb', line 17

def initialize(data)
  @data = data
end

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data.



15
16
17
# File 'lib/exlibris/aleph/table/reader/row/base.rb', line 15

def data
  @data
end

Class Method Details

.attr_ordered_keys(*ordered_keys) ⇒ Object



7
8
9
10
11
12
13
# File 'lib/exlibris/aleph/table/reader/row/base.rb', line 7

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