Class: PurlFetcher::Client::Unpublish
- Inherits:
-
Object
- Object
- PurlFetcher::Client::Unpublish
- Defined in:
- lib/purl_fetcher/client/unpublish.rb
Overview
Delete an item from the purl-fetcher cache
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(druid:) ⇒ Unpublish
constructor
A new instance of Unpublish.
- #unpublish ⇒ Object
Constructor Details
#initialize(druid:) ⇒ Unpublish
Returns a new instance of Unpublish.
14 15 16 |
# File 'lib/purl_fetcher/client/unpublish.rb', line 14 def initialize(druid:) @druid = druid end |
Class Method Details
.unpublish(druid:) ⇒ Object
9 10 11 |
# File 'lib/purl_fetcher/client/unpublish.rb', line 9 def self.unpublish(druid:) new(druid:).unpublish end |
Instance Method Details
#unpublish ⇒ Object
18 19 20 21 22 23 |
# File 'lib/purl_fetcher/client/unpublish.rb', line 18 def unpublish logger.debug("Starting a unpublish request for: #{druid}") response = client.delete(path:) logger.debug("Unpublish request complete") response end |