Sha256: 1397708f42bcfc5af268516b4b9477b9f7188d69946ed62bbc72aeade81b19ec
Contents?: true
Size: 380 Bytes
Versions: 12
Compression:
Stored size: 380 Bytes
Contents
class Object # Outputs the object and also returns it. # Will use <tt>puts</tt> if <tt>new_line</tt> is <tt>true</tt> and # <tt>print</tt> otherwise. # "foo".display # foo # #=> "foo" # # "foo".display(false) # foo#=> "foo" def display(new_line = true) m = new_line ? :puts : :print self.tap { |o| send(m, o) } end alias :d :display end
Version data entries
12 entries across 12 versions & 1 rubygems