class Haml::Exec::Generic

def set_opts(opts)

Parameters:
  • opts (OptionParser) --
def set_opts(opts)
  opts.on('-s', '--stdin', :NONE, 'Read input from standard input instead of an input file') do
    @options[:input] = $stdin
  end
  opts.on('--trace', :NONE, 'Show a full traceback on error') do
    @options[:trace] = true
  end
  opts.on('--unix-newlines', 'Use Unix-style newlines in written files.') do
    @options[:unix_newlines] = true if ::Haml::Util.windows?
  end
  opts.on_tail("-?", "-h", "--help", "Show this message") do
    puts opts
    exit
  end
  opts.on_tail("-v", "--version", "Print version") do
    puts("Haml #{::Haml.version[:string]}")
    exit
  end
end