Class: PackageCloud::ReadToken

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

Instance Method Summary collapse

Methods inherited from Object

#method_missing, #respond_to?

Constructor Details

#initialize(config, attrs) ⇒ ReadToken

Returns a new instance of ReadToken.


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

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

Dynamic Method Handling

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

Instance Method Details

#destroy(master_token_path, read_token_id) ⇒ Object


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

def destroy(master_token_path, read_token_id)
  base_url = @config.base_url
  url = "#{base_url}#{master_token_path}/read_tokens/#{read_token_id}"
  RestClient.delete(url)
end