module Resugan::ObjectHelpers::ClassMethods
Public Instance Methods
attach_hook(method, options = {})
click to toggle source
# File lib/resugan/object_helpers.rb, line 8 def attach_hook(method, options = {}) alias_method "_resugan_orig_#{method}".to_sym, method.to_sym define_method(method.to_sym) do |*args| resugan options[:namespace] do send("_resugan_orig_#{method}".to_sym, *args) end end end