Sha256: 73dc013f23300e9e372f721028fece2056eb8b2500926830c5090e5750bcda2a

Contents?: true

Size: 689 Bytes

Versions: 1

Compression:

Stored size: 689 Bytes

Contents

module Trailblazer::V2_1
  module Activity::Magnetic
    module DSL
      # Every DSL method creates a set of polarizations that are evaluated and decide about a task's
      # incoming and outgoing connections.
      #
      # @note The API of Polarization might be simplified soon.
      # @api  private
      class Polarization
        def initialize( output:raise, color:raise )
          @output, @color = output, color
        end

        def call(magnetic_to, plus_poles, options)
          [
            magnetic_to,
            plus_poles.merge( @output => @color ) # this usually adds a new Output to the task.
          ]
        end
      end # Polarization
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
trailblazer-future-2.1.0.rc1 lib/trailblazer/v2_1/activity/dsl/magnetic/structure/polarization.rb