Sha256: 92a2e910e90835e43d5b7add6a94378a8ab79411ca3f8846c1b8f8ea3e681642

Contents?: true

Size: 1001 Bytes

Versions: 7

Compression:

Stored size: 1001 Bytes

Contents

module Enjoy
  module Catalog
    def self.configuration
      @configuration ||= Configuration.new
    end
    def self.config
      @configuration ||= Configuration.new
    end

    def self.configure
      yield configuration
    end

    class Configuration
      attr_accessor :item_image_styles
      attr_accessor :item_per_page

      attr_accessor :item_images_image_styles

      attr_accessor :item_category_image_styles
      attr_accessor :item_category_per_page

      attr_accessor :item_category_images_image_styles

      attr_accessor :routes_config

      def initialize
        @item_image_styles  = {}
        @item_per_page      = 10

        @item_images_image_styles = {}

        @item_category_image_styles = {}
        @item_category_per_page     = 10

        @item_category_images_image_styles = {}

        @routes_config = {
          use_items_path: true,
          use_item_categories_path: true,
          use_catalog_path: true
        }
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
enjoy_cms_catalog-0.3.4 lib/enjoy/catalog/configuration.rb
enjoy_cms_catalog-0.3.3 lib/enjoy/catalog/configuration.rb
enjoy_cms_catalog-0.3.2 lib/enjoy/catalog/configuration.rb
enjoy_cms_catalog-0.3.1 lib/enjoy/catalog/configuration.rb
enjoy_cms_catalog-0.3.0 lib/enjoy/catalog/configuration.rb
enjoy_cms_catalog-0.2.0.1 lib/enjoy/catalog/configuration.rb
enjoy_cms_catalog-0.2.0 lib/enjoy/catalog/configuration.rb