Move the --style definition for haml to the Haml class.

This commit is contained in:
Nathan Weizenbaum 2008-02-29 10:52:09 -08:00
parent 9e03fa109b
commit 61bd42f6b8
1 changed files with 9 additions and 5 deletions

View File

@ -144,11 +144,6 @@ END
exit exit
end 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 opts.on('-c', '--check', "Just check syntax, don't evaluate.") do
@options[:check_syntax] = true @options[:check_syntax] = true
@options[:output] = StringIO.new @options[:output] = StringIO.new
@ -211,6 +206,15 @@ END
@name = "Haml" @name = "Haml"
end 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 def process_result
super super
input = @options[:input] input = @options[:input]