Sha256: 9ea96981368233eb2165f434e7dbf1fdfbc42f6d53150668597d8cc6b6cc0061

Contents?: true

Size: 678 Bytes

Versions: 76

Compression:

Stored size: 678 Bytes

Contents

module Dynflow
  module Flows
    class Concurrence < AbstractComposed

      protected

      def add_to_sequence(satisfying_flows, dependent_flow)
        if satisfying_flows.empty?
          self.sub_flows << dependent_flow
          return
        end
        extracted_flow = extract_flows(satisfying_flows)
        sequence       = Sequence.new([extracted_flow])

        self.sub_flows << sequence
        sequence << dependent_flow
      end

      def extract_flows(extracted_sub_flows)
        extracted_sub_flows.each do |sub_flow|
          self.sub_flows.delete(sub_flow)
        end

        return Concurrence.new(extracted_sub_flows)
      end
    end
  end
end

Version data entries

76 entries across 76 versions & 1 rubygems

Version Path
dynflow-1.3.0 lib/dynflow/flows/concurrence.rb
dynflow-1.2.3 lib/dynflow/flows/concurrence.rb
dynflow-1.2.2 lib/dynflow/flows/concurrence.rb
dynflow-1.2.1 lib/dynflow/flows/concurrence.rb
dynflow-1.2.0 lib/dynflow/flows/concurrence.rb
dynflow-1.2.0.pre1 lib/dynflow/flows/concurrence.rb
dynflow-1.1.6 lib/dynflow/flows/concurrence.rb
dynflow-1.1.5 lib/dynflow/flows/concurrence.rb
dynflow-1.1.4 lib/dynflow/flows/concurrence.rb
dynflow-1.1.3 lib/dynflow/flows/concurrence.rb
dynflow-1.1.2 lib/dynflow/flows/concurrence.rb
dynflow-1.1.1 lib/dynflow/flows/concurrence.rb
dynflow-1.1.0 lib/dynflow/flows/concurrence.rb
dynflow-1.0.5 lib/dynflow/flows/concurrence.rb
dynflow-1.0.4 lib/dynflow/flows/concurrence.rb
dynflow-1.0.3 lib/dynflow/flows/concurrence.rb
dynflow-1.0.2 lib/dynflow/flows/concurrence.rb
dynflow-1.0.1 lib/dynflow/flows/concurrence.rb
dynflow-1.0.0 lib/dynflow/flows/concurrence.rb
dynflow-0.8.37 lib/dynflow/flows/concurrence.rb