Skip to content

Instantly share code, notes, and snippets.

@maiha
Created October 12, 2012 08:03
Show Gist options
  • Save maiha/3877900 to your computer and use it in GitHub Desktop.
Save maiha/3877900 to your computer and use it in GitHub Desktop.
awesome_print
##################################################
### Before
irb(main):001:0> Song.limit(2)
Song Load (0.2ms) SELECT "songs".* FROM "songs" LIMIT 2
=> [#<Song id: 5, key: "55197", name: "CONTRADICTION", singer: "ももいろクローバーZ", lyric: "前田たかひろ", music: "大隅知宇", body: "飼い馴らせない欲望を\n恥じるのなら\n�...", created_at: "2012-09-19 22:08:16", updated_at: "2012-09-19 22:29:21">, #<Song id: 6, key: "57767", name: "サンタさん", singer: "ももいろクローバーZ", lyric: "前山田健一", music: "前山田健一", body: " ランランラン…\n\nせーの!\nメリークリ�...", created_at: "2012-09-19 22:08:16", updated_at: "2012-09-19 22:29:21">]
##################################################
### Install
cd ~/
wget https://raw.github.com/yuroyoro/dotfiles/master/.pryrc
# Gemfile
group :development, :test do
gem 'pry-rails'
gem 'awesome_print'
gem 'hirb-unicode'
end
##################################################
### After
[1] pry(main)> Song.limit(2)
Song Load (0.1ms) SELECT "songs".* FROM "songs" LIMIT 2
+----+-------+---------------+---------------------+--------------+------------+--------------------------------------------------------+-------------------------+-------------------------+
| id | key | name | singer | lyric | music | body | created_at | updated_at |
+----+-------+---------------+---------------------+--------------+------------+--------------------------------------------------------+-------------------------+-------------------------+
| 5 | 55197 | CONTRADICTION | ももいろクローバーZ | 前田たかひろ | 大隅知宇 | 飼い馴らせない欲望を\n恥じるのなら\nリアルな素顔を... | 2012-09-19 22:08:16 UTC | 2012-09-19 22:29:21 UTC |
| 6 | 57767 | サンタさん | ももいろクローバーZ | 前山田健一 | 前山田健一 | ランランラン…\n\nせーの!\nメリークリスマス!!\n\nエ... | 2012-09-19 22:08:16 UTC | 2012-09-19 22:29:21 UTC |
+----+-------+---------------+---------------------+--------------+------------+--------------------------------------------------------+-------------------------+-------------------------+
2 rows in set
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment