class FrontMatterParser::Parsed
Result of parsing front matter and content from a string
Attributes
@!attribute [rw] content @see initialize
@!attribute [rw] front_matter @see initialize
Public Class Methods
Source
# File lib/front_matter_parser/parsed.rb, line 16 def initialize(front_matter:, content:) @front_matter = front_matter @content = content end
@param front_matter [Hash] parsed front_matter @param content [String] parsed content
Public Instance Methods
Source
# File lib/front_matter_parser/parsed.rb, line 25 def [](key) front_matter[key] end
Returns front matter value for given key
@param key [String] key for desired value @return [String, Array, # Hash] desired value