module TomlRB

def self.load_file(path, symbolize_keys: false)

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 TomlRB.
Raises ValueOverwriteError if a key is overwritten.
Returns a Ruby hash representation of the content.


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

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

Examples


:symbolize_keys - true|false (optional).
path - TomlRB File path

Public: Returns a hash from a *TomlRB* file.
def self.load_file(path, symbolize_keys: false)
  TomlRB.parse(File.read(path), symbolize_keys: symbolize_keys)
end