Sha256: d93a69f4214ae7f4e2d52b3329421d218ba8243736e08d878fc37e707d4d34e9
Contents?: true
Size: 526 Bytes
Versions: 14
Compression:
Stored size: 526 Bytes
Contents
# frozen_string_literal: true require "dry/monads" module Rubysmith module Configuration # Sets target root which defaults to current directory when key is missing. module Transformers include Dry::Monads[:result] TargetRoot = lambda do |content, key = :target_root, path: Pathname.pwd| content.fetch(:target_root) { path } .then { |value| content.merge! key => value } .then { |updated_content| Dry::Monads::Success updated_content } end end end end
Version data entries
14 entries across 14 versions & 1 rubygems