Class: FrontMatterParser::Loader::Yaml

Inherits:
Object
  • Object
show all
Defined in:
lib/front_matter_parser/loader/yaml.rb

Overview

FrontMatterParser::Loader that uses YAML library

Class Method Summary collapse

Class Method Details

.call(string) ⇒ Hash

Loads a hash front matter from a string

Parameters:

  • string (String)

    front matter string representation

Returns:

  • (Hash)

    front matter hash representation



13
14
15
# File 'lib/front_matter_parser/loader/yaml.rb', line 13

def self.call(string)
  YAML.safe_load(string)
end