Method: Config#with_only_path

Defined in:
lib/hocon/config.rb

#with_only_path(path) ⇒ Object

Clone the config with only the given path (and its children) retained; all sibling paths are removed. <p> Note that path expressions have a syntax and sometimes require quoting (see ConfigUtil#joinPath and ConfigUtil#splitPath).

Parameters:

  • path

    path to keep

Returns:

  • a copy of the config minus all paths except the one specified

Raises:



944
945
946
# File 'lib/hocon/config.rb', line 944

def with_only_path(path)
  raise Hocon::ConfigError::ConfigBugOrBrokenError, "subclasses of `Config` must implement `with_only_path` (#{self.class})"
end