Class: Duse::CLI::SecretRemove
- Inherits:
-
ApiCommand
- Object
- Command
- ApiCommand
- Duse::CLI::SecretRemove
- Defined in:
- lib/duse/cli/secret_remove.rb
Instance Attribute Summary
Attributes inherited from Command
#arguments, #force_interactive, #input, #output
Instance Method Summary collapse
Methods inherited from ApiCommand
Methods inherited from Command
abstract, abstract?, #color, command_name, #command_name, #config, description, #error, #execute, #full_command, full_command, has_subcommands?, has_super_command?, #help, #help_subcommands, #initialize, #interactive?, #parse, #say, skip, subcommand, subcommands, #success, super_command, super_command=, #terminal, #usage, #usage_for, #warn, #write_to
Methods included from Parser
Constructor Details
This class inherits a constructor from Duse::CLI::Command
Instance Method Details
#run(secret_id = nil) ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'lib/duse/cli/secret_remove.rb', line 8 def run(secret_id = nil) secret_id ||= terminal.ask('Secret to delete: ').to_i Duse::Secret.delete secret_id success 'Successfully deleted' rescue Duse::Client::Error => e error e. end |