lib/spreadsheet/excel/row.rb in spreadsheet-0.7.3 vs lib/spreadsheet/excel/row.rb in spreadsheet-0.7.4
- old
+ new
@@ -40,9 +40,15 @@
data
else
enriched_data idx, at(idx)
end
end
+ ##
+ # Returns data as an array. If a cell is formatted as a Date or DateTime, the
+ # decoded Date or DateTime value is returned.
+ def to_a
+ self[0...length]
+ end
private
def _date data # :nodoc:
return data if data.is_a?(Date)
datetime = _datetime data
Date.new datetime.year, datetime.month, datetime.day