Class: Acclir::CLI
- Inherits:
-
Thor
- Object
- Thor
- Acclir::CLI
- Defined in:
- lib/acclir/cli.rb
Overview
Acclir CLI
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.exit_on_failure? ⇒ Boolean
12 13 14 |
# File 'lib/acclir/cli.rb', line 12 def self.exit_on_failure? true end |
Instance Method Details
#login ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/acclir/cli.rb', line 17 def login username = ask("Username:") password = ask("Password:", echo: false) begin AtCoder::User.login(username, password) say "\nLogin succeeded!" rescue AtCoder::LoginFailedError => e say_error "\n#{e.}" end end |