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