lib/rep.rb in rep-0.0.2 vs lib/rep.rb in rep-0.0.3

- old
+ new

@@ -54,9 +54,18 @@ if defined?(Hashie) include HashieSupport end end + + # Translate for ActiveSupport, the jerk + if method(:delegate).arity == -1 + def delegate(opts = {}) + methods, object_name = opts.to_a.first + args = methods.concat([:to => object_name]) + super(*args) + end + end } end # Since a goal is to be able to share instances, we need an easy way to reset a # shared instance back to factory defaults. If you memoize any methods that are