Method: Puppet::Pops::Visitor#visit_this_2

Defined in:
lib/puppet/pops/visitor.rb

#visit_this_2(receiver, thing, arg1, arg2) ⇒ Object

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.

Visit an explicit receiver with 2 args (This is ~30% faster than calling the general method)



115
116
117
118
119
120
121
122
# File 'lib/puppet/pops/visitor.rb', line 115

def visit_this_2(receiver, thing, arg1, arg2)
  method_name = @cache[thing.class]
  if method_name
    return receiver.send(method_name, thing, arg1, arg2)
  end

  visit_this(receiver, thing, [arg1, arg2])
end