mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-15 22:41:30 +00:00
removed duplicated conditionals
This commit is contained in:
parent
3773a972aa
commit
146f686d14
@ -16,14 +16,14 @@ class GildedRose
|
|||||||
item.quality = item.quality + 1
|
item.quality = item.quality + 1
|
||||||
if item.name.downcase.match /backstage/
|
if item.name.downcase.match /backstage/
|
||||||
if item.sell_in < 11
|
if item.sell_in < 11
|
||||||
if item.quality < 50
|
|
||||||
item.quality = item.quality + 1
|
item.quality = item.quality + 1
|
||||||
end
|
|
||||||
end
|
end
|
||||||
if item.sell_in < 6
|
if item.sell_in < 6
|
||||||
if item.quality < 50
|
|
||||||
item.quality = item.quality + 1
|
item.quality = item.quality + 1
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user