module Dekoden::SingletonPrependMethods
Public Instance Methods
method_added(method_name)
click to toggle source
Calls superclass method
# File lib/dekoden.rb, line 5 def method_added(method_name) unless unbound_decorators.empty? decorators_for_method = unbound_decorators.dup unbound_decorators.clear decorated_methods.module_eval do define_method(method_name) do |*args, &blk| Helpers.wrap(decorators_for_method, *args, blk) do |*args, blk| super(*args, &blk) end end end end super end
singleton_method_added(method_name)
click to toggle source
Calls superclass method
# File lib/dekoden.rb, line 20 def singleton_method_added(method_name) unless unbound_decorators.empty? decorators_for_method = unbound_decorators.dup unbound_decorators.clear decorated_singleton_methods.module_eval do define_method(method_name) do |*args, &blk| Helpers.wrap(decorators_for_method, *args, blk) do |*args, blk| super(*args, &blk) end end end end super end