Module: Tmuxinator::Helper

Included in:
Cli, ConfigWriter
Defined in:
lib/tmuxinator/helper.rb

Instance Method Summary collapse

Instance Method Details

#confirm!(msg) ⇒ Object



9
10
11
12
13
14
15
16
# File 'lib/tmuxinator/helper.rb', line 9

def confirm!(msg)
  puts msg
  if %w(yes Yes YES y).include?(STDIN.gets.chop)
    yield
  else
    exit! "Aborting."
  end
end

#exit!(msg) ⇒ Object



4
5
6
7
# File 'lib/tmuxinator/helper.rb', line 4

def exit!(msg)
  puts msg
  Kernel.exit(1)
end