Class: Skytap::Commands::Destroy

Inherits:
HttpBase show all
Defined in:
lib/skytap/commands/http.rb

Instance Attribute Summary

Attributes inherited from Base

#args, #command_options, #error, #global_options, #invoker, #logger

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from HttpBase

#delete, #encode_body, #get, #join_paths, make_for, #options_for_request, #parent_path, #path, #post, #put, #request, #requester, #resource, #resource_path, #root_path

Methods inherited from Base

#api_token, #ask, #ask_param, #command_line_params, command_name, #composed_params, #expected_options, #file_params, #find_id, #initialize, #interactive_params, #invoke, make_from, #noninteractive_params, #programmatic?, #solicit_user_input?, #username

Methods included from Help

#description, #help!, #help?, included, #parameters, #synopsis, #version?

Constructor Details

This class inherits a constructor from Skytap::Commands::Base

Class Method Details

.default_descriptionObject



172
173
174
# File 'lib/skytap/commands/http.rb', line 172

def self.default_description
  "Delete specified #{parent.command_name.gsub('_', ' ')}"
end

Instance Method Details

#expected_argsObject



168
169
170
# File 'lib/skytap/commands/http.rb', line 168

def expected_args
  super.merge('id' => "ID or URL of #{resource} to delete")
end

#run!Object



176
177
178
# File 'lib/skytap/commands/http.rb', line 176

def run!
  delete(path)
end