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/current_time.rb,
lib/rubysmith/configuration/transformers/git_hub_user.rb,
lib/rubysmith/configuration/transformers/template_root.rb

Overview

Adds current time to content.

Defined Under Namespace

Classes: GitEmail, GitHubUser, GitUser, TemplateRoot

Constant Summary collapse

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
CurrentTime =
lambda do |content, key = :now, at: Time.now|
  content.fetch(key) { at }
         .then { |value| content.merge! key => value }
         .then { |updated_content| Dry::Monads::Success updated_content }
end