diff --git a/ruby/item_processor.rb b/ruby/item_processor.rb index 37ad0e5b..4e45cd9a 100644 --- a/ruby/item_processor.rb +++ b/ruby/item_processor.rb @@ -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