Class: Hocon::Parser::ConfigDocumentFactory
- Inherits:
-
Object
- Object
- Hocon::Parser::ConfigDocumentFactory
- Defined in:
- lib/hocon/parser/config_document_factory.rb
Overview
Factory for creating com.typesafe.config.parser.ConfigDocument instances.
Class Method Summary collapse
-
.parse_file(file, options = Hocon::ConfigParseOptions.defaults) ⇒ Object
Parses a file into a ConfigDocument instance.
-
.parse_string(s, options = Hocon::ConfigParseOptions.defaults) ⇒ Object
Parses a string which should be valid HOCON or JSON.
Class Method Details
.parse_file(file, options = Hocon::ConfigParseOptions.defaults) ⇒ Object
Parses a file into a ConfigDocument instance.
22 23 24 |
# File 'lib/hocon/parser/config_document_factory.rb', line 22 def self.parse_file(file, = Hocon::ConfigParseOptions.defaults) Hocon::Impl::Parseable.new_file(file, ).parse_config_document end |
.parse_string(s, options = Hocon::ConfigParseOptions.defaults) ⇒ Object
Parses a string which should be valid HOCON or JSON.
33 34 35 |
# File 'lib/hocon/parser/config_document_factory.rb', line 33 def self.parse_string(s, = Hocon::ConfigParseOptions.defaults) Hocon::Impl::Parseable.new_string(s, ).parse_config_document end |