Class: Bridgetown::YAMLParser
- Inherits:
-
Object
- Object
- Bridgetown::YAMLParser
- Defined in:
- bridgetown-core/lib/bridgetown-core/yaml_parser.rb
Constant Summary collapse
- PERMITTED_CLASSES =
[Date, Time, Rb].freeze
Class Method Summary collapse
Class Method Details
.load(yaml, **kwargs) ⇒ Object
12 13 14 |
# File 'bridgetown-core/lib/bridgetown-core/yaml_parser.rb', line 12 def load(yaml, **kwargs) YAML.safe_load yaml, **merge_permitted_classes(kwargs) end |
.load_file(filename, **kwargs) ⇒ Object
8 9 10 |
# File 'bridgetown-core/lib/bridgetown-core/yaml_parser.rb', line 8 def load_file(filename, **kwargs) YAML.safe_load_file filename, **merge_permitted_classes(kwargs) end |