Sha256: f25fa27196973e2b878476ce3bb99c9dc0fb47a1db922c9838f9387601c16e8f
Contents?: true
Size: 698 Bytes
Versions: 5
Compression:
Stored size: 698 Bytes
Contents
# frozen_string_literal: true require "dry/monads" module Milestoner module Configuration module Transformers module Generator # Conditionally updates generator label based on gem specification. class Label include Import[:specification] include Dry::Monads[:result] def initialize(key = :generator_label, **) @key = key super(**) end def call content content.fetch(key) { specification.labeled_version } .then { |value| Success content.merge!(key => value) } end private attr_reader :key end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems