193: def configure(opts)
194: @indent = opts[:indent] if opts.key?(:indent)
195: @space = opts[:space] if opts.key?(:space)
196: @space_before = opts[:space_before] if opts.key?(:space_before)
197: @object_nl = opts[:object_nl] if opts.key?(:object_nl)
198: @array_nl = opts[:array_nl] if opts.key?(:array_nl)
199: @check_circular = !!opts[:check_circular] if opts.key?(:check_circular)
200: @allow_nan = !!opts[:allow_nan] if opts.key?(:allow_nan)
201: if !opts.key?(:max_nesting)
202: @max_nesting = 19
203: elsif opts[:max_nesting]
204: @max_nesting = opts[:max_nesting]
205: else
206: @max_nesting = 0
207: end
208: self
209: end