Sha256: e01f211c5d9b48800cb4b6abbeda57b4db475085f5285d541e4bd4dfd23bf04a

Contents?: true

Size: 478 Bytes

Versions: 5

Compression:

Stored size: 478 Bytes

Contents

# frozen_string_literal: true

require "dry/monads"
require "pathname"
require "refinements/hash"

module Milestoner
  module Configuration
    module Transformers
      # Ensures build root is expanded.
      module Build
        using Refinements::Hash

        Root = lambda do |attributes, key = :build_root|
          attributes.transform_value!(key) { |value| Pathname(value).expand_path }
          Dry::Monads::Success attributes
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
milestoner-18.11.0 lib/milestoner/configuration/transformers/build/root.rb
milestoner-18.10.0 lib/milestoner/configuration/transformers/build/root.rb
milestoner-18.9.0 lib/milestoner/configuration/transformers/build/root.rb
milestoner-18.8.0 lib/milestoner/configuration/transformers/build/root.rb
milestoner-18.7.0 lib/milestoner/configuration/transformers/build/root.rb