Class: Canvas::FrontMatterExtractor

Inherits:
Object
  • Object
show all
Defined in:
lib/canvas/services/front_matter_extractor.rb

Overview

:documented: This service can be used to extract front matter from a liquid string.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(full_markup) ⇒ FrontMatterExtractor

Returns a new instance of FrontMatterExtractor.



9
10
11
12
# File 'lib/canvas/services/front_matter_extractor.rb', line 9

def initialize(full_markup)
  @front_matter = extract_front_matter(full_markup)
  @html = extract_html(full_markup)
end

Instance Attribute Details

#front_matterObject

Returns the value of attribute front_matter.



7
8
9
# File 'lib/canvas/services/front_matter_extractor.rb', line 7

def front_matter
  @front_matter
end

#htmlObject

Returns the value of attribute html.



7
8
9
# File 'lib/canvas/services/front_matter_extractor.rb', line 7

def html
  @html
end