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