lib/csv2hash/cell.rb in csv2hash-0.6.4 vs lib/csv2hash/cell.rb in csv2hash-0.6.5
- old
+ new
@@ -1,11 +1,16 @@
require 'active_support/core_ext/array/extract_options'
-class Cell
+require_relative 'coercers/yaml_coercer'
- attr_accessor :rules
+module Csv2hash
+ class Cell
- def initialize *args
- self.rules = args.extract_options!
- end
+ attr_accessor :rules
+ def initialize *args
+ self.rules = args.extract_options!
+ Csv2hash::Coercers::YamlCoercer.new(rules).deserialize!
+ end
+
+ end
end