class Haml::Exec::HTML2Haml

def process_result

and runs the HTML compiler appropriately.
Processes the options set by the command-line arguments,
def process_result
  super
  require 'haml/html'
  input = @options[:input]
  output = @options[:output]
  @module_opts[:erb] ||= input.respond_to?(:path) && input.path =~ /\.(rhtml|erb)$/
  @module_opts[:erb] &&= @options[:no_erb] != false
  output.write(::Haml::HTML.new(input, @module_opts).render)
rescue ::Haml::Error => e
  raise "#{e.is_a?(::Haml::SyntaxError) ? "Syntax error" : "Error"} on line " +
    "#{get_line e}: #{e.message}"
rescue LoadError => err
  handle_load_error(err)
end