Sha256: 3370c8e37bdcb705c80bd4fd364f32d48e8d667b37247bedefaf0e68cbc1d60f

Contents?: true

Size: 1.01 KB

Versions: 13

Compression:

Stored size: 1.01 KB

Contents

module Attached
  module Processor
    class Base


      attr_accessor :file
      attr_accessor :options
      attr_accessor :attachment


      # Create and run a processor.
      #
      # Parameters:
      #
      # * file       - The file to be processed.
      # * options    - The options to be applied to the processing.
      # * attachment - The attachment the processor is being run for.

      def self.process(file, options = {}, attachment = nil)
        new(file, options, attachment).process
      end


      # Create a processor.
      #
      # Parameters:
      #
      # * file       - The file to be processed.
      # * options    - The options to be applied to the processing.
      # * attachment - The attachment the processor is being run for.

      def initialize(file, options = {}, attachment = nil)
        @file = file
        @options = options
        @attachment = attachment
      end


      # Run the processor.

      def process
        raise NotImplementedError.new
      end


    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
attached-1.0.4 lib/attached/processor/base.rb
attached-1.0.3 lib/attached/processor/base.rb
attached-1.0.2 lib/attached/processor/base.rb
attached-1.0.1 lib/attached/processor/base.rb
attached-1.0.0 lib/attached/processor/base.rb
attached-0.6.0 lib/attached/processor/base.rb
attached-0.5.9 lib/attached/processor/base.rb
attached-0.5.8 lib/attached/processor/base.rb
attached-0.5.7 lib/attached/processor/base.rb
attached-0.5.6 lib/attached/processor/base.rb
attached-0.5.5 lib/attached/processor/base.rb
attached-0.5.4 lib/attached/processor/base.rb
attached-0.5.3 lib/attached/processor/base.rb