Exception: AocCli::Errors::UserDup
- Inherits:
-
StandardError
- Object
- StandardError
- AocCli::Errors::UserDup
- Defined in:
- lib/aoc_cli/errors.rb
Instance Attribute Summary collapse
-
#user ⇒ Object
readonly
Returns the value of attribute user.
Instance Method Summary collapse
-
#initialize(user) ⇒ UserDup
constructor
A new instance of UserDup.
- #message ⇒ Object
Constructor Details
#initialize(user) ⇒ UserDup
Returns a new instance of UserDup.
25 26 27 |
# File 'lib/aoc_cli/errors.rb', line 25 def initialize(user) @user = user end |
Instance Attribute Details
#user ⇒ Object (readonly)
Returns the value of attribute user.
24 25 26 |
# File 'lib/aoc_cli/errors.rb', line 24 def user @user end |
Instance Method Details
#message ⇒ Object
28 29 30 31 32 33 |
# File 'lib/aoc_cli/errors.rb', line 28 def " \#{ERROR}: There is already a key set for the user \#{user.yellow}\n Either check your config file or set a new username for this key using the \#{\"-u\".yellow} or \#{\"--user\".yellow} flags\n error\nend\n" |