Sha256: 9fb9a84684a41479437e12b7545d233b8635d3ebe2a3a5bfaa38f0c98acce6e7

Contents?: true

Size: 468 Bytes

Versions: 3

Compression:

Stored size: 468 Bytes

Contents

# frozen_string_literal: true

require "dry/monads"

module Milestoner
  module Configuration
    module Transformers
      module URI
        Profile = lambda do |attributes, key = :profile_uri|
          uri, domain = attributes.values_at key, :profile_domain

          return Dry::Monads::Success attributes unless uri

          attributes[key] = format uri, domain:, id: "%<id>s"
          Dry::Monads::Success attributes
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
milestoner-17.11.0 lib/milestoner/configuration/transformers/uri/profile.rb
milestoner-17.10.0 lib/milestoner/configuration/transformers/uri/profile.rb
milestoner-17.9.0 lib/milestoner/configuration/transformers/uri/profile.rb