class ActionView::PartialIteration

Experimental RBS support (using type sampling data from the type_fusion project).

# sig/action_view/renderer/collection_renderer.rbs

class ActionView::PartialIteration
  def iterate!: () -> Integer
end

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:

Experimental RBS support (using type sampling data from the type_fusion project).

def iterate!: () -> Integer

This signature was generated using 1 sample from 1 application.

: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