lib/chronicle/etl/loaders/csv_loader.rb in chronicle-etl-0.2.3 vs lib/chronicle/etl/loaders/csv_loader.rb in chronicle-etl-0.2.4
- old
+ new
@@ -6,15 +6,11 @@
def initialize(options={})
super(options)
@rows = []
end
- def load(result)
- if (result.is_a? Hash)
- @rows << result.values
- else
- @rows << result
- end
+ def load(record)
+ @rows << record.to_h_flattened.values
end
def finish
z = $stdout
CSV(z) do |csv|