Module: SimpleMethodCallback::InstanceMethods

Defined in:
lib/simple_method_callback.rb

Class Method Summary collapse

Class Method Details

.prepended(mod) ⇒ Object



47
48
49
50
51
52
53
54
55
# File 'lib/simple_method_callback.rb', line 47

def self.prepended(mod)
  mod.class_variable_get('@@around_only_method_list').map(&:to_sym).each do |method_name|
    define_method(method_name) do |*options|
      run_callbacks method_name do
        super(*options)
      end
    end
  end
end