Sha256: 1d823f4c96d3a0079c41d802375117591bc6d93f9042d515eeaff5e137936920

Contents?: true

Size: 564 Bytes

Versions: 4

Compression:

Stored size: 564 Bytes

Contents

require "workarea"
require "workarea/storefront"
require "workarea/admin"

require "workarea/product_badges/engine"
require "workarea/product_badges/version"

module Workarea
  module Badges
    def self.new_threshold
      config[:new_threshold].try(&:to_i) || 30
    end

    def self.number_of_top_sellers
      config[:number_of_top_sellers].try(:to_i) || 10
    end

    def self.max_badges
      config[:max_badges].try(:to_i)
    end

    def self.sort
      config[:sort]
    end

    def self.config
      Workarea.config.product_badges
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
workarea-product_badges-1.4.1 lib/workarea/product_badges.rb
workarea-product_badges-1.4.0 lib/workarea/product_badges.rb
workarea-product_badges-1.3.3 lib/workarea/product_badges.rb
workarea-product_badges-1.3.2 lib/workarea/product_badges.rb