examples/csv.rb in array_hasher-0.1.3 vs examples/csv.rb in array_hasher-0.1.4
- old
+ new
@@ -1,9 +1,14 @@
require 'bundler/setup'
require 'array_hasher'
+puts "Undefined data type 'bookname'"
+ArrayHasher.csv_each(File.expand_path('../test.csv', __FILE__)) do |line|
+ puts line
+end
+
+puts "\nDefined 'bookname' wrap with <>"
ext_types = {bookname: proc {|v| "<#{v}>" }}
ArrayHasher.csv_each(File.expand_path('../test.csv', __FILE__), ext_types) do |line|
puts line
end
-