Class: Inspec::Resources::YamlConfig
- Inherits:
-
JsonConfig
- Object
- JsonConfig
- Inspec::Resources::YamlConfig
- Defined in:
- lib/inspec/resources/yaml.rb
Instance Attribute Summary
Attributes inherited from JsonConfig
Instance Method Summary collapse
-
#parse(content) ⇒ Object
override file load and parse hash from yaml.
Methods inherited from JsonConfig
#initialize, #method_missing, #to_s, #value
Methods included from FileReader
Methods included from ObjectTraverser
Constructor Details
This class inherits a constructor from Inspec::Resources::JsonConfig
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Inspec::Resources::JsonConfig
Instance Method Details
#parse(content) ⇒ Object
override file load and parse hash from yaml
28 29 30 31 32 |
# File 'lib/inspec/resources/yaml.rb', line 28 def parse(content) YAML.load(content) rescue => e raise Inspec::Exceptions::ResourceFailed, "Unable to parse YAML: #{e.}" end |