Hacked By AnonymousFox

Current Path : /opt/puppetlabs/puppet/lib/ruby/vendor_gems/gems/hocon-1.3.1/lib/hocon/parser/
Upload File :
Current File : //opt/puppetlabs/puppet/lib/ruby/vendor_gems/gems/hocon-1.3.1/lib/hocon/parser/config_document_factory.rb

# encoding: utf-8

require 'hocon/parser'
require 'hocon/impl/parseable'
require 'hocon/config_parse_options'

#
# Factory for creating {@link
# com.typesafe.config.parser.ConfigDocument} instances.
#
class Hocon::Parser::ConfigDocumentFactory
  #
  # Parses a file into a ConfigDocument instance.
  #
  # @param file
  #       the file to parse
  # @param options
  #       parse options to control how the file is interpreted
  # @return the parsed configuration
  # @throws com.typesafe.config.ConfigException on IO or parse errors
  #
  def self.parse_file(file, options = Hocon::ConfigParseOptions.defaults)
    Hocon::Impl::Parseable.new_file(file, options).parse_config_document
  end

  #
  # Parses a string which should be valid HOCON or JSON.
  #
  # @param s string to parse
  # @param options parse options
  # @return the parsed configuration
  #
  def self.parse_string(s, options = Hocon::ConfigParseOptions.defaults)
    Hocon::Impl::Parseable.new_string(s, options).parse_config_document
  end
end

Hacked By AnonymousFox1.0, Coded By AnonymousFox