Sha256: ce0cf8063b2a2bb8e0aa3b5807c6a6f75d9b3e15bf6fe6ea4c1952174f4b8cc7

Contents?: true

Size: 849 Bytes

Versions: 1

Compression:

Stored size: 849 Bytes

Contents

module Trailblazer::V2_1
  module Activity::Magnetic
    # This normalizer only processes basic input and is meant for bootstrapping.
    #
    #   task Callable, id: "success", before: "another"
    class DefaultNormalizer
      # Declarative::Variables
      def self.build(plus_poles:, **options)
        return new(plus_poles: plus_poles), options
      end

      def initialize(**default_options)
        @default_options = default_options
      end

      # Processes the user arguments from the DSL
      def call(task, options)
        local_options = @default_options.merge(options) # here, we merge default :plus_poles.

        local_options, sequence_options = Options.normalize( local_options, Activity::Schema::Dependencies.sequence_keywords )

        return task, local_options, {}, sequence_options, {}
      end
    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/builder/default_normalizer.rb