Class: Hexlet::BaseCLI
- Inherits:
-
Thor
- Object
- Thor
- Hexlet::BaseCLI
- Includes:
- Thor::Actions
- Defined in:
- lib/hexlet/base_cli.rb
Direct Known Subclasses
Constant Summary collapse
- CONFIG_DIR =
include Thor::Shell::Basic
File.join(Dir.home, ".hexlet")
- CREDENTIALS_FILE =
File.join(Dir.home, ".hexlet", "credentials")
Instance Method Summary collapse
Instance Method Details
#login(key) ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/hexlet/base_cli.rb', line 13 def login(key) client = build_client(key) if client.login puts (t :ok) write_config("hexlet_api_key" => key) else puts (t :not_found) end end |