Class Pry::Method::Disowned
In: lib/pry/method.rb
Parent: Method

A Disowned Method is one that‘s been removed from the class on which it was defined.

e.g. class C

  def foo
    C.send(:undefine_method, :foo)
    Pry::Method.from_binding(binding)
  end

end

In this case we assume that the "owner" is the singleton class of the receiver.

This occurs mainly in Sinatra applications.

Methods

method_missing   new   owner   source?   undefined?  

Attributes

name  [R] 
receiver  [R] 

Public Class methods

Create a new Disowned method.

@param [Object] receiver @param [String] method_name

Public Instance methods

Raise a more useful error message instead of trying to forward to nil.

Get the hypothesized owner of the method.

@return [Object]

Can we get the source for this method? @return [Boolean] false

Is the method undefined? (aka `Disowned`) @return [Boolean] true

[Validate]