Class: Asetus::Adapter::YAML

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

Class Method Summary collapse

Class Method Details

.from(yaml) ⇒ Object


19
20
21
22
# File 'lib/asetus/adapter/yaml.rb', line 19

def from yaml
  require 'yaml'
  ::YAML.load yaml
end

.to(hash) ⇒ Object


14
15
16
17
# File 'lib/asetus/adapter/yaml.rb', line 14

def to hash
  require 'yaml'
  ::YAML.dump hash
end