新手问题 有没有方法让数组更容易分辨一点?

artone · 2012年08月29日 · 最后由 alvin2ye 回复于 2012年08月29日 · 2295 次阅读
[#<Category id: 3, name: "Perl", position: 2, created_at: "2012-08-29 04:22:24", updated_at: "2012-08-29 04:22:24">, #<Category id: 4, name: "Ruby", position: 2, created_at: "2012-08-29 05:32:09", updated_at: "2012-08-29 05:38:32">] 

有没有方法能分行显示成类似这个样子,而不是全部搅在一块:

[
#<Category id: 3, name: "Perl", position: 2, created_at: "2012-08-29 04:22:24", updated_at: "2012-08-29 04:22:24">, 
#<Category id: 4, name: "Ruby", position: 2, created_at: "2012-08-29 05:32:09", updated_at: "2012-08-29 05:38:32">
] 

awesome_print

早前有个 hirb 现在不知道如何了

需要 登录 后方可回复, 如果你还没有账号请 注册新账号