Module: TextHelper
- Included in:
- Rockette::Commands::Config, Rockette::Commands::Deploy, Rockette::Commands::Export, Rockette::Commands::Interactive, Rockette::Configurator, Rockette::Deployer, Rockette::Exporter, Rockette::Viewer
- Defined in:
- lib/rockette/text_helper.rb
Overview
Add common methods to Rockette module
Instance Method Summary collapse
- #bail ⇒ Object
- #check_input(input) ⇒ Object
- #file_not_found ⇒ Object
- #no_rockette_dir ⇒ Object
- #padder(str) ⇒ Object
Instance Method Details
#bail ⇒ Object
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_found ⇒ Object
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_dir ⇒ Object
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 |