class Milestoner::Configuration::Transformers::Project::Author
Conditionally updates author based on Git user.
Attributes
Public Class Methods
Source
# File lib/milestoner/configuration/transformers/project/author.rb, line 14 def initialize(key = :project_author, **) super(**) @key = key end
Calls superclass method
Public Instance Methods
Source
# File lib/milestoner/configuration/transformers/project/author.rb, line 19 def call attributes attributes.fetch key do git.get("user.name", nil).bind { |value| attributes.merge! key => value if value } end Success attributes end