Class: Spiral::Renderer::W3m
- Inherits:
-
Object
- Object
- Spiral::Renderer::W3m
- Defined in:
- lib/spiral/renderer/w3m.rb
Instance Method Summary collapse
Instance Method Details
#render(html, options = {}) ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'lib/spiral/renderer/w3m.rb', line 6 def render(html, ={}) opt = {:cols => 80}.merge Open3.popen3 "w3m -cols #{opt[:cols]} -dump -O UTF8 -T text/html" do |i, o, e| i.write html i.close o.read.strip end end |