daily pastebin goal
32%
SHARE
TWEET

Untitled

a guest Mar 13th, 2018 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class Object
  2.   def returning obj
  3.     yield obj
  4.     obj
  5.   end
  6.   def tap
  7.     returning(self) { yield self }
  8.   end
  9.   def tapp
  10.     tap { puts "#{File.basename caller[4]}: #{self.inspect}" }
  11.   end
  12. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top