tt [{:id => 1, :name => "alice"}, {:id => 2, :name => "bob"}]
# >> +----+-------+
# >> | id | name |
# >> +----+-------+
# >> | 1 | alice |
# >> | 2 | bob |
# >> +----+-------+
tt({:id => 1, :name => "alice"})
# >> +------+-------+
# >> | id | 1 |
# >> | name | alice |
# >> +------+-------+
tt 1
# >> +---+
# >> | 1 |
# >> +---+
tt "foo"
# >> +-----+
# >> | foo |
# >> +-----+
tt :foo
# >> +-----+
# >> | foo |
# >> +-----+
ActiveRecord の場合ちょっと見やすくする
["alice", "bob"].each{|name| User.create!(:name => name) }
tt User
# >> +----+-------+
# >> | id | name |
# >> +----+-------+
# >> | 1 | alice |
# >> | 2 | bob |
# >> +----+-------+
tt User.limit(1)
# >> +----+-------+
# >> | id | name |
# >> +----+-------+
# >> | 1 | alice |
# >> +----+-------+
tt User.first
# >> +------+-------+
# >> | id | 1 |
# >> | name | alice |
# >> +------+-------+
puts [{:id => 1, :name => "alice"}, {:id => 2, :name => "bob"}].to_t
# >> +----+-------+
# >> | id | name |
# >> +----+-------+
# >> | 1 | alice |
# >> | 2 | bob |
# >> +----+-------+