Server IP : 66.29.132.122 / Your IP : 18.191.235.62 Web Server : LiteSpeed System : Linux business142.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : admazpex ( 531) PHP Version : 7.2.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /proc/self/root/proc/self/root/proc/thread-self/root/proc/thread-self/root/opt/puppetlabs/puppet/lib/ruby/vendor_gems/gems/hocon-1.3.1/lib/hocon/impl/ |
Upload File : |
# encoding: utf-8 require 'hocon/impl' require 'hocon/impl/path' require 'hocon/config_error' class Hocon::Impl::PathBuilder def initialize @keys = [] @result = nil end def check_can_append if @result raise Hocon::ConfigError::ConfigBugOrBrokenError, "Adding to PathBuilder after getting result" end end def append_key(key) check_can_append @keys.push(key) end def append_path(path) check_can_append first = path.first remainder = path.remainder loop do @keys.push(first) if !remainder.nil? first = remainder.first remainder = remainder.remainder else break end end end def result # note: if keys is empty, we want to return nil, which is a valid # empty path if @result.nil? remainder = nil while !@keys.empty? key = @keys.pop remainder = Hocon::Impl::Path.new(key, remainder) end @result = remainder end @result end end