Class: Ronn::RoffFilter
- Inherits:
-
Object
- Object
- Ronn::RoffFilter
- Defined in:
- lib/ronn/roff.rb
Instance Method Summary collapse
-
#initialize(html, name, section, tagline, manual = nil, version = nil, date = nil) ⇒ RoffFilter
constructor
Convert Ronn HTML to roff.
- #to_s ⇒ Object
Constructor Details
#initialize(html, name, section, tagline, manual = nil, version = nil, date = nil) ⇒ RoffFilter
Convert Ronn HTML to roff.
6 7 8 9 10 11 12 |
# File 'lib/ronn/roff.rb', line 6 def initialize(html, name, section, tagline, manual=nil, version=nil, date=nil) @buf = [] title_heading name, section, tagline, manual, version, date html = Hpricot(html) block_filter(html) write "\n" end |
Instance Method Details
#to_s ⇒ Object
14 15 16 |
# File 'lib/ronn/roff.rb', line 14 def to_s @buf.join.gsub(/[ \t]+$/, '') end |