docs: add documentation for various classes in app/logical.

This commit is contained in:
evazion
2021-06-23 05:09:55 -05:00
parent e5cfb7904c
commit ed302fdf4d
33 changed files with 518 additions and 25 deletions

View File

@@ -1,3 +1,5 @@
# A simple Cloudflare API client for purging cached images after they're
# regenerated or deleted.
class CloudflareService
attr_reader :api_token, :zone
@@ -9,6 +11,9 @@ class CloudflareService
api_token.present? && zone.present?
end
# Purge a list of URLs from Cloudflare's cache.
# @param urls [Array<String>] the list of URLs to purge
# @see https://api.cloudflare.com/#zone-purge-files-by-url
def purge_cache(urls)
return unless enabled?