Class: Rubysmith::Configuration::Transformers::GitHubUser

Inherits:
Object
  • Object
show all
Defined in:
lib/rubysmith/configuration/transformers/git_hub_user.rb

Overview

Dynamically updates repository handle if GitHub user is defined.

Instance Method Summary collapse

Constructor Details

#initialize(key = :repository_handle) ⇒ 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 = :repository_handle, **)
  @key = key
  super(**)
end

Instance Method Details

#call(attributes) ⇒ Object



18
# File 'lib/rubysmith/configuration/transformers/git_hub_user.rb', line 18

def call(attributes) = attributes[key] ? Success(attributes) : user_or(attributes)