Module: Troml
- Defined in:
- lib/troml.rb,
lib/troml/version.rb
Defined Under Namespace
Classes: Error, ExtParseError
Constant Summary collapse
- VERSION =
"0.1.5"
Class Method Summary collapse
-
.parse(raw_toml) ⇒ Hash
Returns a hash representation of the TOML string passed.
-
.parse_file(file_path) ⇒ Hash
Returns a hash representation of the TOML stored in the file at the provided path.
Class Method Details
.parse(raw_toml) ⇒ Hash
Returns a hash representation of the TOML string passed. Raises on parse failure.
46 47 48 |
# File 'lib/troml.rb', line 46 def self.parse(raw_toml) TromlExt.parse(raw_toml) end |
.parse_file(file_path) ⇒ Hash
Returns a hash representation of the TOML stored in the file at the provided path. Raises on parse failure or if the file is not present.
58 59 60 |
# File 'lib/troml.rb', line 58 def self.parse_file(file_path) TromlExt.parse(File.read(file_path)) end |