Class: Jerakia::Datasource::File::Yaml
- Inherits:
-
Object
- Object
- Jerakia::Datasource::File::Yaml
- Defined in:
- lib/jerakia/datasource/file/yaml.rb
Constant Summary collapse
- EXTENSION =
'yaml'.freeze
Class Method Summary collapse
Class Method Details
.convert(data) ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/jerakia/datasource/file/yaml.rb', line 8 def convert(data) return {} if data.empty? begin YAML.load(data) rescue Psych::SyntaxError => e raise Jerakia::FileParseError, "Error parsing YAML document: #{e.}" end end |