Method: Puppet::Pops::Visitor#initialize
- Defined in:
- lib/puppet/pops/visitor.rb
#initialize(receiver, message, min_args = 0, max_args = nil) ⇒ Visitor
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.
Returns a new instance of Visitor.
18 19 20 21 22 23 24 25 26 27 |
# File 'lib/puppet/pops/visitor.rb', line 18 def initialize(receiver, , min_args = 0, max_args = nil) raise ArgumentError, "min_args must be >= 0" if min_args < 0 raise ArgumentError, "max_args must be >= min_args or nil" if max_args && max_args < min_args @receiver = receiver @message = @min_args = min_args @max_args = max_args @cache = Hash.new end |