Class: PackageCloud::GpgKey

Inherits:
Object
  • Object
show all
Defined in:
lib/package_cloud/gpg_key.rb

Instance Method Summary collapse

Methods inherited from Object

#method_missing, #respond_to?

Constructor Details

#initialize(attrs, config) ⇒ GpgKey

Returns a new instance of GpgKey.



3
4
5
6
# File 'lib/package_cloud/gpg_key.rb', line 3

def initialize(attrs, config)
  @attrs = attrs
  @config = config
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class PackageCloud::Object

Instance Method Details

#destroyObject



8
9
10
11
# File 'lib/package_cloud/gpg_key.rb', line 8

def destroy
  url = PackageCloud::Util.compute_url(@config.base_url, @attrs["self"])
  RestClient.delete(url)
end