Module: Spanx::Helper::Exit

Included in:
Actor::Writer, CLI, CLI::Watch, Config, Whitelist
Defined in:
lib/spanx/helper/exit.rb

Instance Method Summary collapse

Instance Method Details

#error_exit_with_msg(msg) ⇒ Object



4
5
6
7
8
# File 'lib/spanx/helper/exit.rb', line 4

def error_exit_with_msg(msg)
  $stderr.puts "Error: #{msg}\n"
  $stderr.puts Spanx::Usage.usage
  exit 1
end

#help_exitObject



9
10
11
12
# File 'lib/spanx/helper/exit.rb', line 9

def help_exit
  $stdout.puts Spanx::Usage.usage
  exit 0
end