Sha256: 9a6ce2721c82167f78aee41dbbe3ddf1e7741303a57b60f8fae83ae57e8893bd
Contents?: true
Size: 480 Bytes
Versions: 23
Compression:
Stored size: 480 Bytes
Contents
module Rhoconnect module Handler module Helpers module Binding def bind_handler(method_name, method_proc) # do nothing if already bound return method_proc if method_proc.is_a?Method self.class.send :define_method, method_name, method_proc method = self.class.instance_method(method_name) self.class.send :remove_method, method_name # bind it to self method.bind(self) end end end end end
Version data entries
23 entries across 23 versions & 1 rubygems