class Sitepress::Parsers::Frontmatter
TODO: Redo this to use File readline and pos to perform faster
TODO: Redo this to use File readline and pos to perform faster
Constants
- DELIMITER
- NEWLINE
- PATTERN
Attributes
body[R]
Public Class Methods
new(content)
click to toggle source
# File lib/sitepress/frontmatter.rb, line 15 def initialize(content) _, @data, @body = content.match(PATTERN).captures end
Public Instance Methods
data()
click to toggle source
# File lib/sitepress/frontmatter.rb, line 19 def data @data ? YAML.load(@data) : {} end