Class: Proc
Instance Method Summary collapse
-
#bind(object) ⇒ Object
Part of the Rails Object#instance_exec implementation.
Instance Method Details
#bind(object) ⇒ Object
Part of the Rails Object#instance_exec implementation
3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 |
# File 'lib/Qt/qtruby4.rb', line 3196 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 |