Sha256: b95d770256fd195daca0863a7541866c5f11b162fda64f58a3219dc2e07452bd
Contents?: true
Size: 373 Bytes
Versions: 307
Compression:
Stored size: 373 Bytes
Contents
# Stolen straight from ActiveSupport class Proc #:nodoc: def bind(object) block, time = self, Time.now (class << object; self end).class_eval do method_name = "__bind_#{time.to_i}_#{time.usec}" define_method(method_name, &block) method = instance_method(method_name) remove_method(method_name) method end.bind(object) end end
Version data entries
307 entries across 258 versions & 47 rubygems