Method: PSON::Pure::Generator::State#check_max_nesting
- Defined in:
- lib/puppet/external/pson/pure/generator.rb
#check_max_nesting(depth) ⇒ Object
:nodoc:
127 128 129 130 131 132 |
# File 'lib/puppet/external/pson/pure/generator.rb', line 127 def check_max_nesting(depth) # :nodoc: return if @max_nesting.zero? current_nesting = depth + 1 current_nesting > @max_nesting and raise NestingError, "nesting of #{current_nesting} is too deep" end |