def add_method_hooks
      eigen_class = @target.singleton_class

      if @options[:class_methods]
        return unless @target.is_a?(Module)

        orig_singleton_method_added = @target.method(:singleton_method_added)

        eigen_class.send :define_method, :singleton_method_added do |method|
          aspector_singleton_method_added(method)
          orig_singleton_method_added.call(method)
        end
      else
        if @target.is_a? Module
          orig_method_added = @target.method(:method_added)
        else
          orig_method_added = eigen_class.method(:method_added)
        end

        eigen_class.send :define_method, :method_added do |method|
          aspector_instance_method_added(method)
          orig_method_added.call(method)
        end
      end
    end
def add_method_hooks
      eigen_class = @target.singleton_class

      if @options[:class_methods]
        return unless @target.is_a?(Module)

        orig_singleton_method_added = @target.method(:singleton_method_added)

        eigen_class.send :define_method, :singleton_method_added do |method|
          aspector_singleton_method_added(method)
          orig_singleton_method_added.call(method)
        end
      else
        if @target.is_a? Module
          orig_method_added = @target.method(:method_added)
        else
          orig_method_added = eigen_class.method(:method_added)
        end

        eigen_class.send :define_method, :method_added do |method|
          aspector_instance_method_added(method)
          orig_method_added.call(method)
        end
      end
    end
Redefines singleton_method_added and method_added methods so they are monitored
 If new method is added we will apply to it appropriate advices