Class: Chimps::Commands::Destroy

Inherits:
Chimps::Command show all
Includes:
Utils::UsesModel
Defined in:
lib/chimps/commands/destroy.rb

Overview

A command to issue a DELETE request against a resource at Infochimps.

Constant Summary collapse

"usage: chimps destroy [OPTIONS] ID_OR_HANDLE"
HELP =
"\nDestroys a resource of a given type (defaults to dataset) identified\nby ID_OR_HANDLE.\n\n"
MODELS =

Models this command applies to (default first)

%w[dataset package source license]

Instance Attribute Summary

Attributes inherited from Chimps::Command

#argv

Instance Method Summary collapse

Methods included from Utils::UsesModel

#define_model_option, #model, #model=, #model_identifier, #model_path, #models_path, #models_string, #plural_model

Methods inherited from Chimps::Command

#initialize, name, #name

Constructor Details

This class inherits a constructor from Chimps::Command

Instance Method Details

#execute!Object

Issue the DELETE request.



21
22
23
# File 'lib/chimps/commands/destroy.rb', line 21

def execute!
  Request.new(model_path, :authenticate => true).delete.print
end