Class: Rubysmith::Configuration::Transformers::GitEmail
- Inherits:
-
Object
- Object
- Rubysmith::Configuration::Transformers::GitEmail
- Defined in:
- lib/rubysmith/configuration/transformers/git_email.rb
Overview
Dynamically adds Git email if defined.
Instance Method Summary collapse
- #call(attributes) ⇒ Object
-
#initialize(key = :author_email) ⇒ GitEmail
constructor
A new instance of GitEmail.
Constructor Details
#initialize(key = :author_email) ⇒ GitEmail
Returns a new instance of GitEmail.
13 14 15 16 |
# File 'lib/rubysmith/configuration/transformers/git_email.rb', line 13 def initialize(key = :author_email, **) @key = key super(**) end |
Instance Method Details
#call(attributes) ⇒ Object
18 |
# File 'lib/rubysmith/configuration/transformers/git_email.rb', line 18 def call(attributes) = attributes[key] ? Success(attributes) : email_or(attributes) |