Methods
C
O
Class Public methods
compile(f)
# File sample/ripper/ruby2html.rb, line 83
def Ruby2HTML.compile(f)
  buf = StringIO.new
  Ruby2HTML.new(f).parse(buf)
  buf.string
end
Instance Public methods
on_comment(tok, f)
# File sample/ripper/ruby2html.rb, line 97
def on_comment(tok, f)
  f << %Q[<span class="comment">#{CGI.escapeHTML(tok.rstrip)}</span>\n]
end
on_default(event, tok, f)
# File sample/ripper/ruby2html.rb, line 89
def on_default(event, tok, f)
  f << CGI.escapeHTML(tok)
end
on_kw(tok, f)
# File sample/ripper/ruby2html.rb, line 93
def on_kw(tok, f)
  f << %Q[<span class="resword">#{CGI.escapeHTML(tok)}</span>]
end
on_tstring_beg(tok, f)
# File sample/ripper/ruby2html.rb, line 101
def on_tstring_beg(tok, f)
  f << %Q[<span class="string">#{CGI.escapeHTML(tok)}]
end
on_tstring_end(tok, f)
# File sample/ripper/ruby2html.rb, line 105
def on_tstring_end(tok, f)
  f << %Q[#{CGI.escapeHTML(tok)}</span>]
end