Module: Tomlib
- Defined in:
- lib/tomlib.rb,
lib/tomlib/error.rb,
lib/tomlib/dumper.rb,
lib/tomlib/version.rb,
ext/tomlib/tomlib.c
Overview
Main library namespace
Defined Under Namespace
Classes: DumpError, Dumper, ParseError
Constant Summary collapse
- VERSION =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
'0.7.2'
Class Method Summary collapse
-
.dump(hash, indent: true) ⇒ String
Dump Ruby Hash into TOML format.
-
.load(rb_str) ⇒ Object
Function exposed to Ruby’s world as Tomlib.load(data).
Class Method Details
.dump(hash, indent: true) ⇒ String
Dump Ruby Hash into TOML format
44 45 46 |
# File 'lib/tomlib.rb', line 44 def self.dump(hash, indent: true) Dumper.new(use_indent: indent).dump(hash) end |
.load(rb_str) ⇒ Object
Function exposed to Ruby’s world as Tomlib.load(data)
310 311 312 |
# File 'ext/tomlib/tomlib.c', line 310
static VALUE tomlib_load(VALUE self, VALUE rb_str) {
return rb_rescue2(tomlib_load_do, rb_str, tomlib_load_rescue, Qnil, rb_eArgError, 0);
}
|