Exception: Ask::Auth::MissingCredential

Inherits:
KeyError
  • Object
show all
Defined in:
lib/ask/auth.rb

Instance Method Summary collapse

Constructor Details

#initialize(names) ⇒ MissingCredential

Returns a new instance of MissingCredential.



21
22
23
24
25
26
27
# File 'lib/ask/auth.rb', line 21

def initialize(names)
  names = Array(names).flatten
  inspected = names.map(&:inspect).join(", ")
  super("No credential found for #{inspected}. " \
        "Set one of #{names.map { |n| n.to_s.upcase }.uniq.join(", ")} in your environment, " \
        "add it to ~/.ask/credentials.yml, or configure a provider.")
end