class ActionView::PartialIteration

def first?

Check if this is the first iteration of the partial.
def first?
  index == 0
end

def initialize(size)

def initialize(size)
  @size  = size
  @index = 0
end

def iterate! # :nodoc:

:nodoc:
def iterate! # :nodoc:
  @index += 1
end

def last?

Check if this is the last iteration of the partial.
def last?
  index == size - 1
end