def _hook_before_method(method, hook, opts = {})
      return false if method == hook
      _add_hooked_method(:before, hook, method)
      original = instance_method(method)
      @_defining_hook = true
      define_method(method) do |*args, &block|
        if opts[:send_args] || opts[:send_arg] || opts[:modify_args] || opts[:send_method] || opts[:try_first]
          margs = args
          margs = [method] + args if opts[:send_method]
          margs = args + [opts[:add_args]].flatten(1) if opts[:add_args]
          result = (hook.is_a?(Proc) ? hook : method(hook)).call(*margs)
          return result if result && opts[:try_first]
          args = result if opts[:modify_args]
        else
          hook.is_a?(Proc) ? hook.call : method(hook).call
        end
        original.bind(self).call(*args, &block)
      end
      @_defining_hook = false
      true
    end
def _hook_before_method(method, hook, opts = {})
      return false if method == hook
      _add_hooked_method(:before, hook, method)
      original = instance_method(method)
      @_defining_hook = true
      define_method(method) do |*args, &block|
        if opts[:send_args] || opts[:send_arg] || opts[:modify_args] || opts[:send_method] || opts[:try_first]
          margs = args
          margs = [method] + args if opts[:send_method]
          margs = args + [opts[:add_args]].flatten(1) if opts[:add_args]
          result = (hook.is_a?(Proc) ? hook : method(hook)).call(*margs)
          return result if result && opts[:try_first]
          args = result if opts[:modify_args]
        else
          hook.is_a?(Proc) ? hook.call : method(hook).call
        end
        original.bind(self).call(*args, &block)
      end
      @_defining_hook = false
      true
    end
Current opts:
 send_args - Sends the arguments of the method to the before hook.
 modify_args - Replaces the original args with the returned value of the
 send_method - Sends the method name as an argument to the hooked method.
               before hook method.
 try_first   - Sends the args to the desired hook first and if the result
               is non-nil, the result is sent instead of calling the hooked
               method.