Skip to content

Commit

Permalink
Removed remaining conditional logic.
Browse files Browse the repository at this point in the history
  • Loading branch information
jimweirich committed Feb 22, 2011
1 parent 49a0c62 commit 4c545aa
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions gilded_rose.rb
Expand Up @@ -85,22 +85,8 @@ def update_one(item)
updater = StandardQualityUpdater.new
end

if updater
updater.update_quality(item)
updater.update_sell_in(item)
return
end

if item.quality > 0
item.quality -= 1
end

item.sell_in -= 1
if item.sell_in < 0
if item.quality > 0
item.quality -= 1
end
end
updater.update_quality(item)
updater.update_sell_in(item)
end
end

Expand Down

0 comments on commit 4c545aa

Please sign in to comment.