In: |
csv.rb
|
Parent: | Array |
DESCRIPTION
CSV::Row -- Describes a row of CSV. Each element must be a CSV::Cell.
SYNOPSIS
CSV::Row#to_a
RETURNS
An Array of String.
DESCRIPTION
Convert CSV::Cell to String. Null is converted to nil.
# File csv.rb, line 106 def to_a self.collect { |cell| cell.is_null ? nil : cell.data } end
SYNOPSIS
CSV::Row#match(rhs)
ARGS
rhs: an Array of cells. Each cell is a instance of CSV::Cell.
RETURNS
true/false. See the souce if you want to know matching algorithm.
DESCRIPTION
Compare another row with me.
# File csv.rb, line 122 def match(rhs) if self.size != rhs.size return false end for idx in 0...(self.size) unless self[idx].match(rhs[idx]) return false end end true end