class ProgressiveRender::FragmentNameIterator

Generates a prefix for a given progressive_render section in a stable manner. This way on each load we assign the outer most progressive_render block with the same name. Nested progressive_render blocks are not supported, this approach may need to be re-evaluated for that use case.

Public Class Methods

new() click to toggle source
# File lib/progressive_render/fragment_name_iterator.rb, line 7
def initialize
  @current = 0
end

Public Instance Methods

next!() click to toggle source
# File lib/progressive_render/fragment_name_iterator.rb, line 11
def next!
  @current += 1

  @current.to_s
end