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
  if RbConfig::CONFIG['host_os'] =~ /mswin|windows/i
    opts.on('--unix-newlines', 'Use Unix-style newlines in written files.') do
      @options[:unix_newlines] = true
    end
  end
  opts.on_tail("-?", "-h", "--help", "Show this message") do
    puts opts
    exit
  end
  opts.on_tail("-v", "--version", "Print version") do
    puts("Haml/Sass #{::Haml.version[:string]}")
    exit
  end
end