composed method - old item

This commit is contained in:
davidraj 2022-10-10 18:58:30 +01:00
parent 8a5ad5ca19
commit 5f137d6312

View File

@ -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