Sha256: f67faf715c3046ded30ac55eef4cf8e4ba28d3c552cf49dbf633c13ed7be9c03

Contents?: true

Size: 529 Bytes

Versions: 1

Compression:

Stored size: 529 Bytes

Contents

module Scrooge
  module Strategy
    class Controller
      
      attr_accessor :strategy
      attr_reader :thread
                    
      def initialize( strategy )
        @strategy = strategy
      end
      
      def run!
        @thread = Thread.new do
          Thread.current.abort_on_exception = true
          stages.map do |stage|
            stage.execute!
          end
        end
      end
      
      private
      
        def stages #:nodoc:
          @strategy.stages
        end
      
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
methodmissing-scrooge-1.0.2 lib/scrooge/strategy/controller.rb