Sha256: 7661db2d1f1c06ba9bd85482591fb09738c8879d7ef0920ac14a1f17e3645caf
Contents?: true
Size: 701 Bytes
Versions: 3
Compression:
Stored size: 701 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 attributes attributes.fetch(key) { specification.homepage_url } .then { |value| Success attributes.merge!(key => value) } end private attr_reader :key end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems