diff --git a/lib/haml/exec.rb b/lib/haml/exec.rb index 0c01d6cc..4d6ed62a 100644 --- a/lib/haml/exec.rb +++ b/lib/haml/exec.rb @@ -144,11 +144,6 @@ END exit end - opts.on('-t', '--style NAME', - 'Output style. Can be indented (default) or ugly.') do |name| - @options[:for_engine][:ugly] = true if name.to_sym == :ugly - end - opts.on('-c', '--check', "Just check syntax, don't evaluate.") do @options[:check_syntax] = true @options[:output] = StringIO.new @@ -211,6 +206,15 @@ END @name = "Haml" end + def set_opts(opts) + super + + opts.on('-t', '--style NAME', + 'Output style. Can be indented (default) or ugly.') do |name| + @options[:for_engine][:ugly] = true if name.to_sym == :ugly + end + end + def process_result super input = @options[:input]