Skip to content

Instantly share code, notes, and snippets.

@tmaeda
Created September 12, 2013 20:38
Show Gist options
  • Save tmaeda/6543407 to your computer and use it in GitHub Desktop.
Save tmaeda/6543407 to your computer and use it in GitHub Desktop.
.pryrc にこういうの書いておくと、たまに捗る。httpclientなりmechanizeなりで取得してきたレスポンスHTMLに .w3m ってつければレンダリングして内容を確かめられる。
class String
def w3m
IO.popen("w3m -F -T text/html -dump", "w") do |w3m|
w3m.puts self
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment