Required Files
Methods
Public Instance methods
to_method(name=nil)

Creates a local method based on a Proc.

# File lib/facets/core/proc/to_method.rb, line 15
  def to_method(name=nil)
    name ||= "!to_method_temp#{self.id}"
    recv = eval("self", self)
    klass = recv.class
    MethodMutexes[klass => name].synchronize do
      begin
        klass.send(:define_method, name, &self)
        return recv.method(name)
      ensure
        klass.send(:remove_method, name) if not name
      end
    end
  end