Sha256: 5c16f2c794141a0ad9ca81c6cc76166daec04d5f5e4c4dec43a01eadccb29142

Contents?: true

Size: 482 Bytes

Versions: 23

Compression:

Stored size: 482 Bytes

Contents

require 'dragonfly/job/step'

module Dragonfly
  class Job
    class Process < Step
      def init
        processor.update_url(job.url_attributes, *arguments) if processor.respond_to?(:update_url)
      end

      def name
        args.first.to_sym
      end

      def arguments
        args[1..-1]
      end

      def processor
        @processor ||= app.get_processor(name)
      end

      def apply
        processor.call(job.content, *arguments)
      end
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
dragonfly-1.4.1 lib/dragonfly/job/process.rb
dragonfly-1.4.0 lib/dragonfly/job/process.rb
dragonfly-1.3.0 lib/dragonfly/job/process.rb
dragonfly-1.2.1 lib/dragonfly/job/process.rb
dragonfly-1.2.0 lib/dragonfly/job/process.rb
dragonfly-1.1.5 lib/dragonfly/job/process.rb
dragonfly-1.1.4 lib/dragonfly/job/process.rb
dragonfly-1.1.3 lib/dragonfly/job/process.rb
dragonfly-1.1.2 lib/dragonfly/job/process.rb
dragonfly-1.1.1 lib/dragonfly/job/process.rb
dragonfly-1.1.0 lib/dragonfly/job/process.rb
dragonfly-1.0.12 lib/dragonfly/job/process.rb
dragonfly-1.0.11 lib/dragonfly/job/process.rb
dragonfly-1.0.10 lib/dragonfly/job/process.rb
dragonfly-1.0.9 lib/dragonfly/job/process.rb
dragonfly-1.0.8 lib/dragonfly/job/process.rb
dragonfly-1.0.7 lib/dragonfly/job/process.rb
dragonfly-1.0.6 lib/dragonfly/job/process.rb
dragonfly-1.0.5 lib/dragonfly/job/process.rb
dragonfly-1.0.4 lib/dragonfly/job/process.rb