Sha256: 96be68bd0915df625f3da0a43f00e41b2e05078e1a16ac1133bda71051e06499
Contents?: true
Size: 191 Bytes
Versions: 2
Compression:
Stored size: 191 Bytes
Contents
class Object def try(*args, &block) return nil if self.nil? block.given? ? yield(self) : self.__send__(args.shift, *args) end def tap yield(self) return self end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
darkhelmet-darkext-0.10.0 | lib/darkext/object.rb |
darkhelmet-darkext-0.11.0 | lib/darkext/object.rb |