marioaquino (owner)

Revisions

gist: 45448 Download_button fork
public
Public Clone URL: git://gist.github.com/45448.git
Embed All Files: show embed
convert.rb #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
require 'rubygems'
require 'syntax/convertors/html'
 
def to_html(dirname)
  convertor = Syntax::Convertors::HTML.for_syntax "ruby"
  Dir.chdir(dirname)
  Dir.glob("*.rb") do |filename|
    f = File.new(filename.gsub(".rb", ".html"), "w")
    f << convertor.convert( File.read( filename ) )
    f.close
  end
end
 
to_html(ARGV[0])