Module: Drum::YAMLUtils

Included in:
FileService, PersistentHash, StdioService
Defined in:
lib/drum/utils/yaml.rb

Instance Method Summary collapse

Instance Method Details

#from_yaml(yaml) ⇒ Object

Deserializes YAML with a number of standard permitted classes.



7
8
9
# File 'lib/drum/utils/yaml.rb', line 7

def from_yaml(yaml)
  YAML.load(yaml, permitted_classes: [Date, DateTime, Symbol, Time])
end