Class: TotalRecall::ParseStrategy::Abn
- Inherits:
-
Object
- Object
- TotalRecall::ParseStrategy::Abn
- Defined in:
- lib/total_recall.rb
Overview
/Ing
Class Method Summary collapse
Instance Method Summary collapse
- #options ⇒ Object
-
#parse_row(row) ⇒ Object
Expected: Hash with: :amount => Float, :currency => String, :description => String, :date => Date.
Class Method Details
.options ⇒ Object
52 53 54 |
# File 'lib/total_recall.rb', line 52 def self. {:col_sep => "\t"} end |
Instance Method Details
#options ⇒ Object
56 57 58 |
# File 'lib/total_recall.rb', line 56 def self.class. end |
#parse_row(row) ⇒ Object
Expected: Hash with: :amount => Float, :currency => String, :description => String, :date => Date
43 44 45 46 47 48 49 50 |
# File 'lib/total_recall.rb', line 43 def parse_row(row) { :amount => row[6].sub(/,/,'.').to_f, :date => Date.parse(row[2]), :description => row[7].strip.gsub(/\s+/,' '), :currency => row[1] } end |