lib/prezzo/composed.rb in prezzo-0.2.1 vs lib/prezzo/composed.rb in prezzo-0.2.2

- old
+ new

@@ -6,16 +6,14 @@ end end module ClassMethods def composed_by(options) - @@__calculators = {} - options.each do |name, klass| - @@__calculators[name] = klass + options[name] = klass define_method(name) do - @@__calculators[name].new(context).calculate + options[name].new(context).calculate end end end end end