Module: Jerakia::Datasource::File::Yaml
- Defined in:
- lib/jerakia/datasource/file/yaml.rb
Constant Summary collapse
- EXTENSION =
'yaml'.freeze
Instance Method Summary collapse
Instance Method Details
#convert(data) ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'lib/jerakia/datasource/file/yaml.rb', line 6 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 |