Class: Squidward::Command::Credentials
- Defined in:
- lib/squidward/commands/credentials.rb
Overview
Handles all the commands related to credentials
Instance Method Summary collapse
-
#clear(args = nil) ⇒ Object
Removes the stored credentials from the current configuration.
-
#set(args = nil) ⇒ Object
Stores the credentials to the current configuration.
Methods inherited from Secured
#ask, #ask_for_credentials, #ask_for_password, #echo_off, #echo_on, #initialize, #read_credentials, #store_credentials
Methods inherited from Base
#configuration, #display, #logger, #store_configuration
Constructor Details
This class inherits a constructor from Squidward::Command::Secured
Instance Method Details
#clear(args = nil) ⇒ Object
Removes the stored credentials from the current configuration
6 7 8 9 10 |
# File 'lib/squidward/commands/credentials.rb', line 6 def clear(args = nil) new_configuration = configuration new_configuration[:credentials] = nil store_configuration(new_configuration) end |
#set(args = nil) ⇒ Object
Stores the credentials to the current configuration
13 14 15 |
# File 'lib/squidward/commands/credentials.rb', line 13 def set(args = nil) # don't do anything, already handles it the parent class end |