Sha256: fa71b57b9da14b907a49c9ee9dcacd6c9d580882852d0d6d1218688caad1bbe8
Contents?: true
Size: 298 Bytes
Versions: 3
Compression:
Stored size: 298 Bytes
Contents
class Object # Call parent class/module methods once bound to self. # # require 'facet/object/super_send' # def super_send(klass, meth, *args, &blk) raise ArgumentError if ! self.class.ancestors.include?(klass) klass.instance_method(meth).bind(self).call(*args, &blk) end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
facets-0.7.0 | lib/facet/object/super_send.rb |
facets-0.7.1 | lib/facet/object/super_send.rb |
facets-0.7.2 | lib/facet/object/super_send.rb |