Class IceNine::RecursionGuard::ObjectSet
In: lib/ice_nine/support/recursion_guard.rb
Parent: self

Protects against infinite recursion by never yielding with the same object more than once.

Methods

guard   new  

Public Class methods

Initialize a recursion guard

@return [undefined]

Public Instance methods

Guard against recursively calling a block with the same object

@example

  recursion_guard = IceNine::RecursionGuard::ObjectSet.new
  recursion_guard.guard(object) do
    logic_which_may_be_recursively_called_with_object(recursion_guard)
  end

@param [Object] object

@return [Object]

[Validate]