Class: BerkeleyLibrary::TIND::Export::Row
- Inherits:
-
Object
- Object
- BerkeleyLibrary::TIND::Export::Row
- Defined in:
- lib/berkeley_library/tind/export/row.rb
Instance Attribute Summary collapse
-
#columns ⇒ Object
readonly
Returns the value of attribute columns.
-
#row_index ⇒ Object
readonly
Returns the value of attribute row_index.
Instance Method Summary collapse
- #each_value(&block) ⇒ Object
-
#initialize(columns, row_index) ⇒ Row
constructor
A new instance of Row.
- #values ⇒ Object
Constructor Details
#initialize(columns, row_index) ⇒ Row
Returns a new instance of Row.
9 10 11 12 |
# File 'lib/berkeley_library/tind/export/row.rb', line 9 def initialize(columns, row_index) @columns = columns @row_index = row_index end |
Instance Attribute Details
#columns ⇒ Object (readonly)
Returns the value of attribute columns.
6 7 8 |
# File 'lib/berkeley_library/tind/export/row.rb', line 6 def columns @columns end |
#row_index ⇒ Object (readonly)
Returns the value of attribute row_index.
7 8 9 |
# File 'lib/berkeley_library/tind/export/row.rb', line 7 def row_index @row_index end |
Instance Method Details
#each_value(&block) ⇒ Object
18 19 20 |
# File 'lib/berkeley_library/tind/export/row.rb', line 18 def each_value(&block) columns.map { |c| c.value_at(row_index) }.each(&block) end |
#values ⇒ Object
14 15 16 |
# File 'lib/berkeley_library/tind/export/row.rb', line 14 def values columns.map { |c| c.value_at(row_index) } end |