Skip to content

Instantly share code, notes, and snippets.

@mtunjic
mtunjic / to_haml.rb
Created June 21, 2011 10:55
Convert ERb views to Haml
class ToHaml
def initialize(path)
@path = path
end
def convert!
Dir["#{@path}/**/*.erb"].each do |file|
`html2haml -rx #{file} #{file.gsub(/\.erb$/, '.haml')}`
end
end