lib/chemistrykit/chemist.rb in chemistrykit-3.8.1 vs lib/chemistrykit/chemist.rb in chemistrykit-3.9.0.rc1

- old
+ new

@@ -13,11 +13,16 @@ @data = {} end def data=(data) data.each do |key, value| - send("#{key}=", value) unless key == :key + send("#{key}=", value) unless key == :key || key == :with end + end + + def with(chemist) + send("#{chemist.type}=", chemist) + self end # allow this object to be set with arbitrary key value data def method_missing(name, *arguments) value = arguments[0]