Class: Rubysmith::Configuration::Transformers::GitUser
- Inherits:
-
Object
- Object
- Rubysmith::Configuration::Transformers::GitUser
- Defined in:
- lib/rubysmith/configuration/transformers/git_user.rb
Overview
Dynamically adds Git user if defined.
Instance Method Summary collapse
Instance Method Details
#call(content) ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/rubysmith/configuration/transformers/git_user.rb', line 13 def call content return Success content if content[:author_given_name] || content[:author_family_name] git.get("user.name").fmap do |name| first, last = String(name).split content.merge author_given_name: first, author_family_name: last end end |