Sha256: 991d8eeddf1a430d8931f30c412af440aea8607c2f35b8a37fcccbb35d31593b

Contents?: true

Size: 439 Bytes

Versions: 6

Compression:

Stored size: 439 Bytes

Contents

# frozen_string_literal: true

module ActsAsFavoritor
  class << self
    attr_accessor :configuration
  end

  def self.configure
    self.configuration ||= Configuration.new
    yield configuration
  end

  class Configuration
    DEFAULT_SCOPE = :favorite
    DEFAULT_CACHE = false

    attr_accessor :cache, :default_scope

    def initialize
      @default_scope = DEFAULT_SCOPE
      @cache         = DEFAULT_CACHE
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
acts_as_favoritor-6.0.2 lib/acts_as_favoritor/configuration.rb
acts_as_favoritor-6.0.1 lib/acts_as_favoritor/configuration.rb
acts_as_favoritor-6.0.0 lib/acts_as_favoritor/configuration.rb
acts_as_favoritor-5.0.3 lib/acts_as_favoritor/configuration.rb
acts_as_favoritor-5.0.2 lib/acts_as_favoritor/configuration.rb
acts_as_favoritor-5.0.1 lib/acts_as_favoritor/configuration.rb