Class: FloodCli::Cli::Console
- Inherits:
-
Thor
- Object
- Thor
- FloodCli::Cli::Console
- Defined in:
- lib/cli/console.rb
Instance Method Summary collapse
Instance Method Details
#login ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/cli/console.rb', line 8 def login say('Enter your Flood IO credentials.', :yellow) email = ask('Email: ') password = ask('Password: ', echo: false) puts config = ask('Config: ', default: "#{Dir.home}/.fio") endpoint = ask('Endpoint: ', default: 'https://api.flood.io') proxy = ask('HTTP Proxy: ') cli = FloodCli.new(endpoint: endpoint, proxy: proxy, config: config, verbose: [:verbose]) cli.login(email: email, password: password) end |