Sha256: 2016416938953584e45175cb72f035fb77c05277ac269ba99dd04ae14d18aeea

Contents?: true

Size: 441 Bytes

Versions: 12

Compression:

Stored size: 441 Bytes

Contents

module Papa
  class Runner
    attr_accessor :queue, :last_command, :success, :last_error

    def initialize(queue)
      @queue = queue || []
    end

    def run
      @success = true
      message = nil
      @queue.each do |command|
        if command.run.failed?
          @success = false
          command.cleanup
          @last_error = command.failure_message
          break
        end
      end
      @success
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
papa-1.2.0 lib/papa/runner.rb
papa-1.1.0 lib/papa/runner.rb
papa-1.0.0 lib/papa/runner.rb
papa-0.7.2 lib/papa/runner.rb
papa-0.7.1 lib/papa/runner.rb
papa-0.7.0 lib/papa/runner.rb
papa-0.6.2 lib/papa/runner.rb
papa-0.6.1 lib/papa/runner.rb
papa-0.6.0 lib/papa/runner.rb
papa-0.5.0 lib/papa/runner.rb
papa-0.4.1 lib/papa/runner.rb
papa-0.4.0 lib/papa/runner.rb