比如说我打下这个命令会输出这些内容:
Blog.all
Blog Load (1.1ms) SELECT "blogs".* FROM "blogs"
=> #<ActiveRecord::Relation [#<Blog id: 1, title: "最近心累", view_count: 90, blog_content_id: 1, account_id: 1, cached_tag_list: "test", comments_count: 0, created_at: "2016-05-31 09:46:58", updated_at: "2016-06-01 16:18:41">, #<Blog id: 2, title: "最近心累最近心累", view_count: 1, blog_content_id: 2, account_id: 1, cached_tag_list: "haha", comments_count: 1, created_at: "2016-05-31 09:47:09", updated_at: "2016-06-01 15:49:45">, #<Blog id: 20, title: "阿叔嗲话是对哈速度和", view_count: 10, blog_content_id: 20, account_id: 1, cached_tag_list: nil, comments_count: 0, created_at: "2016-06-02 13:04:12", updated_at: "2016-06-02 13:14:08">]>
怎么实现像 shell 里面的'>'这个的重定向的功能到某个文件里面呢?