class Milestoner::Configuration::Transformers::Project::Author
Conditionally updates author based on Git user.
Attributes
key[R]
Public Class Methods
new(key = :project_author, **)
click to toggle source
Calls superclass method
# File lib/milestoner/configuration/transformers/project/author.rb, line 14 def initialize(key = :project_author, **) @key = key super(**) end
Public Instance Methods
call(attributes)
click to toggle 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