【发布时间】:2013-01-28 19:32:12
【问题描述】:
我正在尝试重定向 IRB 中的漂亮打印输出,但 pp page >> results.txt 不起作用。 如何将漂亮的打印重定向到文件?我使用的是 Windows 操作系统。
我的代码
require 'nokogiri'
require 'mechanize'
agent = Mechanize.new
agent.user_agent_alias = 'Windows Mozilla'
page = agent.get('http://www.asus.com/Search/')
pp page
【问题讨论】:
标签: ruby mechanize pretty-print