Class: Sherpa::CLI::Config
- Inherits:
-
Object
- Object
- Sherpa::CLI::Config
- Defined in:
- lib/sherpa/cli/config.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(prompt = TTY::Prompt.new) ⇒ Config
constructor
A new instance of Config.
- #run ⇒ Object
Constructor Details
#initialize(prompt = TTY::Prompt.new) ⇒ Config
Returns a new instance of Config.
6 7 8 |
# File 'lib/sherpa/cli/config.rb', line 6 def initialize(prompt = TTY::Prompt.new) @prompt = prompt end |
Class Method Details
.run ⇒ Object
10 11 12 |
# File 'lib/sherpa/cli/config.rb', line 10 def self.run new.run end |
Instance Method Details
#run ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/sherpa/cli/config.rb', line 14 def run prompt.warn("You haven't setup your Sherpa config yet") if setup_config? setup_config_file else Kernel.exit end end |