Module: Brutal::Yaml
- Defined in:
- lib/brutal/yaml.rb
Overview
Brutal::Yaml
Constant Summary collapse
- FILENAME_EXTENSIONS =
%w[ .yaml .yml ].freeze
Class Method Summary collapse
Class Method Details
.parse(yaml) ⇒ Object
15 16 17 |
# File 'lib/brutal/yaml.rb', line 15 def self.parse(yaml) ::YAML.safe_load(yaml, symbolize_names: false) end |
.parse?(pathname) ⇒ Boolean
19 20 21 22 |
# File 'lib/brutal/yaml.rb', line 19 def self.parse?(pathname) filename_extension = pathname.extname FILENAME_EXTENSIONS.include?(filename_extension) end |