lib/milestoner/configuration/transformers/gems/label.rb in milestoner-17.0.0 vs lib/milestoner/configuration/transformers/gems/label.rb in milestoner-17.1.0

- old
+ new

@@ -17,19 +17,18 @@ @key = key @path = path super(**) end - def call(content) = Success process(content) + def call content + content.fetch(key) { spec_loader.call(path).label } + .then { |value| value unless value == "Undefined" } + .then { |value| Success content.merge!(key => value) } + end private attr_reader :key, :path - - def process content - content.fetch(key) { spec_loader.call(path).label } - .then { |value| value == "Undefined" ? content : content.merge!(key => value) } - end end end end end end