Sha256: 09c36e56c51bc9d5a4677eadd90e25f3b5cdfca669c55269478299de86a6145a

Contents?: true

Size: 881 Bytes

Versions: 1

Compression:

Stored size: 881 Bytes

Contents

module CarrierWave::Processor
  module Backend
    class Base
      attr_accessor :options, :delays, :uploaders
      def initialize options={}
        @options = options
      end
      def errback &block
        errbacks << block
      end

      def callback &block
        callbacks << block
      end

      def callbacks
        @callbacks ||= []
      end

      def errbacks
        @callbacks ||= []
      end

      def stub &block
        @stub = block
      end

      def stub_cache &block
        @stub_cache = block
      end

      def uploaders
        @uploaders ||= []
      end

      def delay uploader, uniq_version_name
        @delays ||= {}
        @delays[uploader] ||= []
        @delays[uploader] << uniq_version_name if uniq_version_name
      end

      def create_worker *args, &block
        raise NotImplementedError.new
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
carrierwave-processor-1.1.0 lib/carrierwave/processor/backend/base.rb