class Milestoner::Configuration::Transformers::Gems::Name
Conditionally updates project name based on specification name.
Attributes
key[R]
path[R]
Public Class Methods
new(key = :project_name, path: "
click to toggle source
Calls superclass method
# File lib/milestoner/configuration/transformers/gems/name.rb, line 15 def initialize(key = :project_name, path: "#{Pathname.pwd.basename}.gemspec", **) @key = key @path = path super(**) end
Public Instance Methods
call(attributes)
click to toggle source
# File lib/milestoner/configuration/transformers/gems/name.rb, line 21 def call attributes attributes.fetch key do value = spec_loader.call(path).name attributes.merge! key => value if value end Success attributes end