Class: Asetus::Adapter::TOML

Inherits:
Object
  • Object
show all
Defined in:
lib/asetus/adapter/toml.rb

Class Method Summary collapse

Class Method Details

.from(toml) ⇒ Object



18
19
20
21
# File 'lib/asetus/adapter/toml.rb', line 18

def from(toml)
  require 'toml'
  ::TOML.load toml
end

.to(hash) ⇒ Object



13
14
15
16
# File 'lib/asetus/adapter/toml.rb', line 13

def to(hash)
  require 'toml'
  ::TOML::Generator.new(hash).body
end