Class: Beggar::CLI
- Inherits:
-
Object
- Object
- Beggar::CLI
- Defined in:
- lib/beggar/cli.rb
Class Method Summary collapse
Class Method Details
.run ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/beggar/cli.rb', line 4 def run if File.exists?(config) $stdout.puts Base.new(Basecamp.new(load_config)).summary else create_config $stdout.puts "New config has been created in ~/.beggar" $stdout.puts "Please fill it with proper data." end exit 0 rescue URI::InvalidURIError $stdout.puts "Ensure that your config file is proper formatted!" exit 1 end |