Module: Hocon::ConfigParseable
- Included in:
- Impl::Parseable
- Defined in:
- lib/hocon/config_parseable.rb
Overview
An opaque handle to something that can be parsed, obtained from ConfigIncludeContext.
<p> Do not implement this interface; it should only be implemented by the config library. Arbitrary implementations will not work because the library internals assume a specific concrete implementation. Also, this interface is likely to grow new methods over time, so third-party implementations will break.
Instance Method Summary collapse
-
#options ⇒ Object
Get the initial options, which can be modified then passed to parse().
-
#origin ⇒ Object
Returns a ConfigOrigin describing the origin of the parseable item.
-
#parse(options) ⇒ Object
Parse whatever it is.
Instance Method Details
#options ⇒ Object
Get the initial options, which can be modified then passed to parse(). These options will have the right description, includer, and other parameters already set up.
47 48 49 |
# File 'lib/hocon/config_parseable.rb', line 47 def raise Hocon::ConfigError::ConfigBugOrBrokenError, "subclasses of `ConfigParseable` must implement `options` (#{self.class})" end |
#origin ⇒ Object
Returns a ConfigOrigin describing the origin of the parseable item.
37 38 39 |
# File 'lib/hocon/config_parseable.rb', line 37 def origin raise Hocon::ConfigError::ConfigBugOrBrokenError, "subclasses of `ConfigParseable` must implement `origin` (#{self.class})" end |
#parse(options) ⇒ Object
Parse whatever it is. The options should come from ConfigParseable#options options() but you could tweak them if you like.
28 29 30 |
# File 'lib/hocon/config_parseable.rb', line 28 def parse() raise Hocon::ConfigError::ConfigBugOrBrokenError, "subclasses of `ConfigParseable` must implement `parse` (#{self.class})" end |