lib/bhook/args_parser.rb in bhook-0.1.6 vs lib/bhook/args_parser.rb in bhook-0.2.0
- old
+ new
@@ -14,14 +14,12 @@
end
def parse
begin
@opt_parser.parse(@argv)
- if generate_theme_missing? && help_missing?
- if source_or_output_paths_missing?
- raise OptionParser::MissingArgument.new('See --help.')
- end
+ if generate_theme_missing? && help_missing? && source_or_output_paths_missing?
+ raise OptionParser::MissingArgument, 'See --help.'
end
rescue OptionParser::ParseError => e
puts "\nError! #{e.message}\n"
return nil
end
@@ -89,10 +87,10 @@
FalseClass,
'Run a performance benchmark for the specified source') do
@args.benchmark = true
end
- opts.on('-h', '--help', FalseClass, 'Prints this help') do |help|
+ opts.on('-h', '--help', FalseClass, 'Prints this help') do |_help|
@args.help = true
end
end
end
end