module ExpiringAssetLinks::Configuration

Constants

VALID_CONFIG_KEYS

Public Class Methods

extended(base) click to toggle source
  # File lib/expiring_asset_links/configuration.rb
7 def self.extended(base)
8   base.reset
9 end

Public Instance Methods

configure() { |self| ... } click to toggle source
   # File lib/expiring_asset_links/configuration.rb
15 def configure
16   yield self
17   raise TypeError, "expected fog_directory to be a Regexp" unless self.fog_directory.is_a?(Regexp)
18   missing_names = ["name", "id"] - self.fog_directory.names
19   raise RegexpError, "fog_directory must capture #{missing_names.join(' and ')}" unless missing_names.empty?
20 end
reset() click to toggle source
   # File lib/expiring_asset_links/configuration.rb
11 def reset
12   self.fog_directory = DEFAULT_FOG_DIRECTORY
13 end