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
3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 |
# File 'lib/Qt/qtruby4.rb', line 3169 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 |