Module: Hocon::Parser::ConfigNode

Included in:
Impl::AbstractConfigNode
Defined in:
lib/hocon/parser/config_node.rb

Overview

An immutable node that makes up the ConfigDocument AST, and which can be used to reproduce part or all of the original text of an input.

<p> Because this object is immutable, it is safe to use from multiple threads and there’s no need for “defensive copies.”

<p> Do not implement interface ConfigNode; 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

Instance Method Details

#renderObject

The original text of the input which was used to form this particular node.

Returns:

  • the original text used to form this node as a String

Raises:



27
28
29
# File 'lib/hocon/parser/config_node.rb', line 27

def render
  raise Hocon::ConfigError::ConfigBugOrBrokenError, "subclasses of ConfigNode should override `render` (#{self.class})"
end