Skip to content

Commit

Permalink
don't use the same name for a local variable as we use for an instanc…
Browse files Browse the repository at this point in the history
…e method, that's just confusing
  • Loading branch information
agrobbin committed Jun 4, 2014
1 parent b0cd90a commit 9d0121f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/spritely/image_set.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ def repeated?

def position_in!(collection_width)
if repeated?
left = 0
while left < collection_width
add_image!(left)
left += width
left_position = 0
while left_position < collection_width
add_image!(left_position)
left_position += width
end
else
add_image!(0)
Expand All @@ -50,10 +50,10 @@ def position_in!(collection_width)

private

def add_image!(left)
def add_image!(left_position)
images << Image.new(data).tap do |image|
image.top = top
image.left = left
image.left = left_position
end
end
end
Expand Down

0 comments on commit 9d0121f

Please sign in to comment.