Sha256: 847fc9ac569530092aafd64f066de30fd5bcd3bcfb41c7ab810583fb40e357ea

Contents?: true

Size: 456 Bytes

Versions: 5

Compression:

Stored size: 456 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 :default_scope
    attr_accessor :cache

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

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
acts_as_favoritor-5.0.0 lib/acts_as_favoritor/configuration.rb
acts_as_favoritor-4.0.3 lib/acts_as_favoritor/configuration.rb
acts_as_favoritor-4.0.2 lib/acts_as_favoritor/configuration.rb
acts_as_favoritor-4.0.1 lib/acts_as_favoritor/configuration.rb
acts_as_favoritor-4.0.0 lib/acts_as_favoritor/configuration.rb