mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-10 04:01:19 +00:00
<duplicated code> eliminar condicional repetida
This commit is contained in:
parent
a55474f928
commit
0653eb8414
@ -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
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user