Rio - Ruby I/O Facilitator

写的好,我收藏起来慢慢看. 写的好,我支持一下. 没什么意思,把他踩下去. 该文章被关注了819次,收藏了0次,顶了0次 ,踩了0脚.

发现一个相当棒的类库Rio ,使用了下,相当棒,特别推荐。


Rio is a facade for most of the standard ruby classes that deal with I/O; providing a simple, intuitive, succinct interface to the functionality provided by IO, File, Dir, Pathname, FileUtils, Tempfile, StringIO, OpenURI and others. Rio also provides an application level interface which allows many common I/O idioms to be expressed succinctly.


看段代码:


  1. open an URI and copy the content into a file

require ‘rubygems’
require ‘rio’
rio(‘http://originalcopyright.com/’) > rio(‘originalcopyright_index.html’)

即将该URL的内容输出为一个本地文件.

标签: lib, Rio
发布时间: 2008-01-11 11:27:40 | 发布者: IceskYsl | 阅读次数:819 回到主页
IceskYsl: RE:Rio - Ruby I/O Facilitator( 2008-01-11 13:25:53 )

这有篇文章使用了:
http://www.juretta.com/log/2006/08/13/ruby_net_http_and_open-uri/


登录发表你对这个话题的看法吧?



(在注册时提供的email地址)



(注册时设定的密码)
(公共场合请慎用!)

忘记密码了? 还没有注册?