Sha256: 04d233e5d35ed647dcbfeba153d60b8d2d469a3bd7d430aac08a021adc06e8b8

Contents?: true

Size: 345 Bytes

Versions: 5

Compression:

Stored size: 345 Bytes

Contents

class Engine
  def initialize(options={})
  end

  def run(options, &block)
    log = options[:log]
    collection = options[:batch]
    log.write "collection length: #{collection.length}"
    begin
      instance_exec(collection, &block)
    rescue Exception => e
      log.write "Error: #{e}"
    end
    log.write "worker finished"
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ferry-0.0.6 lib/ferry/engine.rb
ferry-0.0.5 lib/ferry/engine.rb
ferry-0.0.4 lib/ferry/engine.rb
ferry-0.0.2 lib/ferry/engine.rb
ferry-0.0.1 lib/ferry/engine.rb