Class: Dri::Commands::Rm::Profile
- Inherits:
-
Dri::Command
- Object
- Dri::Command
- Dri::Commands::Rm::Profile
- Defined in:
- lib/dri/commands/rm/profile.rb
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(options) ⇒ Profile
constructor
A new instance of Profile.
Methods inherited from Dri::Command
#add_color, #api_client, #bold, #command, #config, #cursor, #editor, #emoji, #handover_report_path, #logger, #ops_token, #pastel, #profile, #prompt, #spinner, #timezone, #token, #username, #verify_config_exists
Constructor Details
#initialize(options) ⇒ Profile
Returns a new instance of Profile.
10 11 12 |
# File 'lib/dri/commands/rm/profile.rb', line 10 def initialize() @options = end |
Instance Method Details
#execute ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/dri/commands/rm/profile.rb', line 14 def execute(*) verify_config_exists remove = prompt.yes? "Are you sure you want to remove existing profile?" unless remove logger.info "Profile kept in place 👍" exit 0 end logger.info "Removing profile..." FileUtils.rm("#{Dir.pwd}/.dri_profile.yml") logger.success "Done ✅" end |