Class: Shale::Adapter::Tomlib

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

Overview

Tomlib adapter

Class Method Summary collapse

Class Method Details

.dump(obj, **options) ⇒ 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

  • options (Hash)

Returns:

  • (String)


31
32
33
# File 'lib/shale/adapter/tomlib.rb', line 31

def self.dump(obj, **options)
  ::Tomlib.dump(obj, **options)
end

.load(toml, **_options) ⇒ 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

  • options (Hash)

Returns:

  • (Hash)


19
20
21
# File 'lib/shale/adapter/tomlib.rb', line 19

def self.load(toml, **_options)
  ::Tomlib.load(toml)
end