Class: Shale::Adapter::TomlRB

Inherits:
Object
  • Object
show all
Defined in:
lib/shale/adapter/toml_rb.rb

Overview

TOML adapter

Class Method Summary collapse

Class Method Details

.dump(obj) ⇒ String

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Serialize Hash into TOML

Parameters:

  • obj (Hash)

    Hash object

Returns:

  • (String)


29
30
31
# File 'lib/shale/adapter/toml_rb.rb', line 29

def self.dump(obj)
  ::TomlRB.dump(obj)
end

.load(toml) ⇒ Hash

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Parse TOML into Hash

Parameters:

  • toml (String)

    TOML document

Returns:

  • (Hash)


18
19
20
# File 'lib/shale/adapter/toml_rb.rb', line 18

def self.load(toml)
  ::TomlRB.parse(toml)
end