Method: Puppet::Pops::Types::RecursionGuard#add_that

Defined in:
lib/puppet/pops/types/recursion_guard.rb

#add_that(instance) ⇒ Integer

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Add the given argument as ‘that’ and return the resulting state

Parameters:

  • instance (Object)

    the instance to add

Returns:

  • (Integer)

    the resulting state



90
91
92
93
94
95
# File 'lib/puppet/pops/types/recursion_guard.rb', line 90

def add_that(instance)
  if (@state & SELF_RECURSION_IN_THAT) == 0
    @state = @state | SELF_RECURSION_IN_THAT if that_put(instance)
  end
  @state
end