mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-16 06:51:27 +00:00
composed method - old item
This commit is contained in:
parent
8a5ad5ca19
commit
5f137d6312
@ -19,7 +19,7 @@ class ItemProcessor
|
||||
end
|
||||
end
|
||||
end
|
||||
item.sell_in = item.sell_in - 1 if item.name != 'Sulfuras, Hand of Ragnaros'
|
||||
old_item
|
||||
if item.sell_in < 0
|
||||
if item.name != 'Aged Brie'
|
||||
if item.name != 'Backstage passes to a TAFKAL80ETC concert'
|
||||
@ -40,4 +40,8 @@ class ItemProcessor
|
||||
def decrease_item_quality
|
||||
item.quality -= 1 if item.quality > 0 && item.name != 'Sulfuras, Hand of Ragnaros'
|
||||
end
|
||||
|
||||
def old_item
|
||||
item.sell_in = item.sell_in - 1 if item.name != 'Sulfuras, Hand of Ragnaros'
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
Reference in New Issue
Block a user