Sha256: 9c5a946c011596866d313976e327ea1600c24ceef94c485a0e3f05984b24bbd6
Contents?: true
Size: 396 Bytes
Versions: 3
Compression:
Stored size: 396 Bytes
Contents
=begin rdoc Basic, add an alias_method to the object class Add returning to the object =end class Object def alias_method(new_id, original_id) original = self.method(original_id).to_proc define_method(new_id){|*args| original.call(*args)} end def returning(receiver) yield receiver receiver end def extended(&block) block.in_context(self).call self end end
Version data entries
3 entries across 3 versions & 2 rubygems
Version | Path |
---|---|
auser-poolparty-0.0.8 | lib/core/object.rb |
auser-poolparty-0.0.9 | lib/core/object.rb |
dreadpiratepj-poolparty-0.0.8 | lib/core/object.rb |