Class: Ronn::RoffFilter

Inherits:
Object
  • Object
show all
Defined in:
lib/ronn/roff.rb

Instance Method Summary collapse

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_sObject



14
15
16
# File 'lib/ronn/roff.rb', line 14

def to_s
  @buf.join.gsub(/[ \t]+$/, '')
end