Class: Hocon::Impl::Parseable
- Inherits:
-
Object
- Object
- Hocon::Impl::Parseable
- Defined in:
- lib/hocon/impl/parseable.rb
Direct Known Subclasses
Defined Under Namespace
Classes: ParseableFile
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.force_parsed_to_object(value) ⇒ Object
52 53 54 55 56 57 58 59 |
# File 'lib/hocon/impl/parseable.rb', line 52 def self.force_parsed_to_object(value) if value.is_a? Hocon::Impl::AbstractConfigObject value else raise ConfigWrongTypeError.new(value.origin, "", "object at file root", value.value_type.name) end end |
.new_file(file_path, options) ⇒ Object
40 41 42 |
# File 'lib/hocon/impl/parseable.rb', line 40 def self.new_file(file_path, ) ParseableFile.new(file_path, ) end |
Instance Method Details
#include_context ⇒ Object
48 49 50 |
# File 'lib/hocon/impl/parseable.rb', line 48 def include_context @include_context end |
#options ⇒ Object
44 45 46 |
# File 'lib/hocon/impl/parseable.rb', line 44 def end |
#parse ⇒ Object
61 62 63 |
# File 'lib/hocon/impl/parseable.rb', line 61 def parse self.class.force_parsed_to_object(parse_value()) end |
#parse_value(base_options) ⇒ Object
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/hocon/impl/parseable.rb', line 65 def parse_value() # note that we are NOT using our "initialOptions", # but using the ones from the passed-in options. The idea is that # callers can get our original options and then parse with different # ones if they want. = () # passed-in options can override origin origin = if .origin_description Hocon::Impl::SimpleConfigOrigin.new_simple(.origin_description) else @initial_origin end parse_value_from_origin(origin, ) end |