Class: UnboundMethod

Inherits:
Object show all
Defined in:
lib/abstractivator/proc_ext.rb

Instance Method Summary collapse

Instance Method Details

#explicit_receiverObject

returns a version of the procedure that takes the receiver (that would otherwise need to be bound with .bind()) as the first argument



146
147
148
149
150
# File 'lib/abstractivator/proc_ext.rb', line 146

def explicit_receiver
  proc do |receiver, *args, &block|
    self.bind(receiver).call(*args, &block)
  end
end