lib/throttling.rb
# Gets current Throttling storage. By default returns Rails.cache
# (if it is a Rails application).
Gets current Throttling storage. By default returns Rails.cache
(if it is a Rails application).
Gets current Throttling storage . By default returns Rails . cache ( if it is a Rails application ) .
def storage
      @@storage ||= (defined?(Rails) && Rails.respond_to?(:cache) && Rails.cache) || nil
      raise ArgumentError, 'Throttling.storage is not specified' unless @@storage
      @@storage
    end
def storage @@storage ||= ( defined? ( Rails ) && Rails . respond_to? ( :cache ) && Rails . cache ) || nil raise ArgumentError , 'Throttling.storage is not specified' unless @@storage @@storage end
Gets current Throttling storage.
Gets current Throttling storage .