lib/remnant/discover.rb in remnant-0.9.5 vs lib/remnant/discover.rb in remnant-1.0.0
- old
+ new
@@ -7,16 +7,17 @@
end
def _inject(key, klass, method, instance)
klass.class_eval <<-EOL, __FILE__, __LINE__
#{"class << self" unless instance}
- def #{method}_with_remnant(*args, &block)
+ alias_method :#{method}_without_remnant, :#{method}
+
+ def #{method}(*args, &block)
::Remnant::Discover.measure(#{key.inspect}) do
#{method}_without_remnant(*args, &block)
end
end
- alias_method_chain :#{method}, :remnant
#{"end" unless instance}
EOL
end
def find_with(klass, &block)