lib/spanx/helper/exit.rb in spanx-0.1.1 vs lib/spanx/helper/exit.rb in spanx-0.3.0

- old
+ new

@@ -1,11 +1,15 @@ module Spanx module Helper module Exit def error_exit_with_msg(msg) - $stderr.puts "Error: #{msg}" - $stderr.puts Spanx::USAGE + $stderr.puts "Error: #{msg}\n" + $stderr.puts Spanx::Usage.usage exit 1 + end + def help_exit + $stdout.puts Spanx::Usage.usage + exit 0 end end end end