class SeparatedValues::Document

Attributes

options[R]
rows[R]

Public Class Methods

new(rows, options = DEFAULT_OPTIONS) click to toggle source
# File lib/separated_values/document.rb, line 5
def initialize(rows, options = DEFAULT_OPTIONS)
  @rows = rows
  @options = options
end

Public Instance Methods

[](index) click to toggle source
# File lib/separated_values/document.rb, line 10
def [](index)
  rows[index]
end
to_hash_array() click to toggle source
# File lib/separated_values/document.rb, line 14
def to_hash_array
  rows.map do |row|
    row.to_h(options[:schema])
  end
end