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, #cursor, #editor, #pastel, #prompt, #spinner, #verify_config_exists
Methods included from Utils::Helpers
Constructor Details
#initialize(options) ⇒ Profile
Returns a new instance of Profile.
9 10 11 |
# File 'lib/dri/commands/rm/profile.rb', line 9 def initialize() @options = end |
Instance Method Details
#execute ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/dri/commands/rm/profile.rb', line 13 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 |