Sha256: 63ee7db249f62bdf9e2680ff75f77e365ea02ace9d846491b4a5a403cc9a3262

Contents?: true

Size: 610 Bytes

Versions: 1

Compression:

Stored size: 610 Bytes

Contents

# frozen_string_literal: true

require "dry/monads"

module Milestoner
  module Configuration
    module Transformers
      module Project
        # Conditionally updates generator based on gem specification.
        class Generator
          include Import[:specification]
          include Dry::Monads[:result]

          def initialize(key = :project_generator, **)
            @key = key
            super(**)
          end

          def call(content) = Success({key => specification.labeled_version}.merge!(content))

          private

          attr_reader :key
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
milestoner-17.0.0 lib/milestoner/configuration/transformers/project/generator.rb