Method: Puppet::Pops::Types::RecursionGuard#add_this

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

#add_this(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 ‘this’ and return the resulting state

Parameters:

  • instance (Object)

    the instance to add

Returns:

  • (Integer)

    the resulting state



80
81
82
83
84
85
# File 'lib/puppet/pops/types/recursion_guard.rb', line 80

def add_this(instance)
  if (@state & SELF_RECURSION_IN_THIS) == 0
    @state = @state | SELF_RECURSION_IN_THIS if this_put(instance)
  end
  @state
end