module TOML

def self.load_file(path, options = {})

Raises Errno::EACCES if the file cannot be accessed.
Raises Errno::ENOENT if the file cannot be found.
Raises ParseError if the content has invalid TOML.
Raises ValueOverwriteError if a key is overwritten.
Returns a Ruby hash representation of the content.


# => {group: {}}
TOML.load_file('/tmp/simple.toml', symbolize_keys: true)

# => {"group"=>{}}
TOML.load_file('/tmp/simple.toml')

Examples


:symbolize_keys - true|false (optional).
options - The Hash options used to refine the parser (default: {}):
path - TOML File path

Public: Returns a hash from a *TOML* file.
def self.load_file(path, options = {})
  TOML.parse(File.read(path), options)
end