Exception: AocCli::Errors::UserDup

Inherits:
StandardError
  • Object
show all
Defined in:
lib/aoc_cli/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#userObject (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

#messageObject



28
29
30
31
32
33
# File 'lib/aoc_cli/errors.rb', line 28

def message
  "  \#{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"