lib/receptacle/method_delegation.rb in receptacle-0.3.0 vs lib/receptacle/method_delegation.rb in receptacle-0.3.1
- old
+ new
@@ -36,17 +36,14 @@
# build method cache for given method name
# @param method_name [#to_sym]
# @return [MethodCache]
def __build_method_call_cache(method_name)
config = Registration.repositories[self]
- before_method_name = :"before_#{method_name}"
- after_method_name = :"after_#{method_name}"
raise Errors::NotConfigured, repo: self if config.strategy.nil?
MethodCache.new(
strategy: config.strategy,
- before_wrappers: config.wrappers.select { |w| w.method_defined?(before_method_name) },
- after_wrappers: config.wrappers.select { |w| w.method_defined?(after_method_name) },
+ wrappers: config.wrappers,
method_name: method_name
)
end
# build lightweight method to mediate method calls to strategy without wrappers