Skip to content

Instantly share code, notes, and snippets.

@jefflab
Created September 25, 2010 14:53
Show Gist options
  • Save jefflab/596911 to your computer and use it in GitHub Desktop.
Save jefflab/596911 to your computer and use it in GitHub Desktop.
# How to print objects like the irb console
user = User.new( :name => "Henry" )
puts "#{user.inspect}" # print object in string
p user # shortcut, same as above
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment