lib/webby/renderer.rb
def _track_rendering( path )
    loop_error = @@stack.include? path
    @@stack << path
    @_bindings << _binding

    if loop_error
      msg = "rendering loop detected for '#{path}'\n"
      msg << "    current rendering stack\n\t"
      msg << @@stack.join("\n\t")
      raise ::Webby::Error, msg
    end

    yield
  ensure
    @@stack.pop if path == @@stack.last
    @_bindings.pop
  end
# call-seq:
#    _track_rendering( path ) {block}
#
# Keep track of the page rendering for the given _path_. The _block_ is
# where the the page will be rendered.
#
# This method keeps a stack of the current pages being rendeered. It looks
# for duplicates in the stack -- an indication of a rendering loop. When a
# rendering loop is detected, an error is raised.
#
# This method returns whatever is returned from the _block_.
#
call-seq:
_track_rendering( path ) {block}

Keep track of the page rendering for the given _path_. The _block_ is
where the the page will be rendered.

This method keeps a stack of the current pages being rendeered. It looks
for duplicates in the stack -- an indication of a rendering loop. When a
rendering loop is detected, an error is raised.

This method returns whatever is returned from the _block_.
call - seq : _track_rendering ( path ) { block } Keep track of the page rendering for the given _path_ . The _block_ is where the the page will be rendered . This method keeps a stack of the current pages being rendeered . It looks for duplicates in the stack -- an indication of a rendering loop . When a rendering loop is detected an error is raised . This method returns whatever is returned from the _block_ .
def _track_rendering( path )
    loop_error = @@stack.include? path
    @@stack << path
    @_bindings << _binding
    if loop_error
      msg = "rendering loop detected for '#{path}'\n"
      msg << "    current rendering stack\n\t"
      msg << @@stack.join("\n\t")
      raise ::Webby::Error, msg
    end
    yield
  ensure
    @@stack.pop if path == @@stack.last
    @_bindings.pop
  end
def _track_rendering ( path ) loop_error = @@stack . include? path @@stack << path @_bindings << _binding if loop_error msg = "rendering loop detected for '#{path}'\n" msg << "    current rendering stack\n\t" msg << @@stack . join ( "\n\t" ) raise :: Webby :: Error , msg end yield ensure @@stack . pop if path == @@stack . last @_bindings . pop end
call-seq:
_track_rendering( path ) {block}
call - seq : _track_rendering ( path ) { block }
path