mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-15 22:41:30 +00:00
Composition of never sold method
This commit is contained in:
parent
5f137d6312
commit
299a7efb12
@ -8,6 +8,8 @@ class ItemProcessor
|
||||
end
|
||||
|
||||
def update_item_quality
|
||||
return if never_sold
|
||||
|
||||
if (item.name != 'Aged Brie') && (item.name != 'Backstage passes to a TAFKAL80ETC concert')
|
||||
decrease_item_quality
|
||||
else
|
||||
@ -44,4 +46,8 @@ class ItemProcessor
|
||||
def old_item
|
||||
item.sell_in = item.sell_in - 1 if item.name != 'Sulfuras, Hand of Ragnaros'
|
||||
end
|
||||
|
||||
def never_sold
|
||||
item.name == 'Sulfuras, Hand of Ragnaros'
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
Reference in New Issue
Block a user