Method: Config#get_int

Defined in:
lib/hocon/config.rb

#get_int(path) ⇒ Object

Gets the integer at the given path. If the value at the path has a fractional (floating point) component, it will be discarded and only the integer part will be returned (it works like a “narrowing primitive conversion” in the Java language specification).

Parameters:

  • path

    path expression

Returns:

  • the 32-bit integer value at the requested path

Raises:



470
471
472
# File 'lib/hocon/config.rb', line 470

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