Skip to content

Commit

Permalink
fixed typos
Browse files Browse the repository at this point in the history
  • Loading branch information
Todd Sedano committed Mar 24, 2011
1 parent 5552d0b commit 87cb2d9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions gilded_rose.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ def updateQuality
@items[i].quality = @items[i].quality + 1;

if ("Backstage passes to a TAFKAL80ETC concert".eql?(@items[i].name))
if (@items[i].sellIn < 11)
if (@items[i].sell_in < 11)
if (@items[i].quality < 50)
@items[i].quality(@items[i].quality + 1);
end
end

if (@items[i].sellIn < 6)
if (@items[i].sell_in < 6)
if (@items[i].quality < 50)
@items[i].quality(@items[i].quality + 1);
end
Expand All @@ -44,10 +44,10 @@ def updateQuality
end

if (!"Sulfuras, Hand of Ragnaros".eql?(@items[i].name))
@items[i].sellIn = @items[i].sellIn - 1;
@items[i].sell_in = @items[i].sell_in - 1;
end

if (@items[i].sellIn < 0)
if (@items[i].sell_in < 0)
if (!"Aged Brie".eql?(@items[i].name))
if (!"Backstage passes to a TAFKAL80ETC concert".eql?(@items[i].name))
if (@items[i].quality > 0)
Expand Down
8 changes: 4 additions & 4 deletions item.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
class Item

attr_accessor :name, :sellIn, :quality

def initialize (name, sellIn, quality)
attr_accessor :name, :sell_in, :quality
def initialize (name, sell_in, quality)
@name = name
@sellIn = sellIn
@sell_in = sell_in
@quality = quality
end

Expand Down

0 comments on commit 87cb2d9

Please sign in to comment.