lib/method_found/builder.rb in method_found-0.1.4 vs lib/method_found/builder.rb in method_found-0.1.5
- old
+ new
@@ -25,12 +25,12 @@
class Builder < Module
attr_reader :interceptors
# @yield Yields builder as context to block, to allow calling builder
# methods to create interceptors in included class.
- def initialize(&block)
+ def initialize
@interceptors = []
- instance_eval &block
+ super
end
def intercept(*args, &block)
@interceptors.push(interceptor = Interceptor.new(*args, &block))
include interceptor