Module: TextHelper

Overview

Add common methods to Rockette module

Instance Method Summary collapse

Instance Method Details

#bailObject



5
6
7
8
9
10
# File 'lib/rockette/text_helper.rb', line 5

def bail
  puts "Bailing, a socket (network) or IO error occurred. Can you access the url from here?"
  puts "Double check the url and make sure you have a network connection to the target."
  puts
  exit
end

#check_input(input) ⇒ Object



12
13
14
# File 'lib/rockette/text_helper.rb', line 12

def check_input(input)
  input unless input.nil?
end

#file_not_foundObject



16
17
18
19
20
# File 'lib/rockette/text_helper.rb', line 16

def file_not_found
  puts "File not found. Double check file name and place in ~/.rockette/exports, /usr/app, or /usr/local/app"
  puts
  exit
end

#no_rockette_dirObject



22
23
24
25
26
# File 'lib/rockette/text_helper.rb', line 22

def no_rockette_dir
  puts "Unable to locate a suitable place for the .rockette directory."
  puts "Please double check your home directory..."
  exit
end

#padder(str) ⇒ Object



28
29
30
# File 'lib/rockette/text_helper.rb', line 28

def padder(str)
  "\n#{str}\n"
end