Sha256: 0a85e2ef5478db6a4d973a91c58982377fc786d6073d03d1bde6e451d8b99ee8

Contents?: true

Size: 497 Bytes

Versions: 2

Compression:

Stored size: 497 Bytes

Contents

# frozen_string_literal: true

# Handles `Paperclip` attachments on the backend in a delayed process.
module Paperweight
  # Allows configuring certain attributes about how to process attachments.
  class Configuration
    attr_accessor :download_attempts, :max_size

    def initialize
      @download_attempts = 1
      @max_size = 10 * 1024 * 1024
    end
  end

  class << self
    def config
      @config ||= Configuration.new
    end

    def configure
      yield config
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
paperweight-1.2.1 lib/paperweight/configuration.rb
paperweight-1.2.0 lib/paperweight/configuration.rb