Module: Rubysmith::Configuration::Transformers

Defined in:
lib/rubysmith/configuration/transformers/target_root.rb,
lib/rubysmith/configuration/transformers/git_user.rb,
lib/rubysmith/configuration/transformers/git_email.rb,
lib/rubysmith/configuration/transformers/git_hub_user.rb,
lib/rubysmith/configuration/transformers/template_root.rb

Overview

Sets target root which defaults to current directory when key is missing.

Defined Under Namespace

Classes: GitEmail, GitHubUser, GitUser, TemplateRoot

Constant Summary collapse

TargetRoot =
lambda do |attributes, key = :target_root, path: Pathname.pwd|
  attributes.fetch(:target_root) { path }
            .then { |value| attributes.merge! key => value }
            .then { |updated_attributes| Dry::Monads::Success updated_attributes }
end