<duplicated code> eliminar condicional repetida

This commit is contained in:
Felipe Gaete 2024-08-18 23:41:07 -04:00
parent a55474f928
commit 0653eb8414

View File

@ -29,14 +29,10 @@ class GildedRose
increase_quality(item) increase_quality(item)
if item.name == "Backstage passes to a TAFKAL80ETC concert" if item.name == "Backstage passes to a TAFKAL80ETC concert"
if item.sell_in < 11 if item.sell_in < 11
if item.quality < 50 increase_quality(item)
increase_quality(item)
end
end end
if item.sell_in < 6 if item.sell_in < 6
if item.quality < 50 increase_quality(item)
increase_quality(item)
end
end end
end end
end end