Class: Canvas::FrontMatterExtractor
- Inherits:
-
Object
- Object
- Canvas::FrontMatterExtractor
- 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
-
#front_matter ⇒ Object
Returns the value of attribute front_matter.
-
#html ⇒ Object
Returns the value of attribute html.
Instance Method Summary collapse
-
#initialize(full_markup) ⇒ FrontMatterExtractor
constructor
A new instance of FrontMatterExtractor.
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_matter ⇒ Object
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 |
#html ⇒ Object
Returns the value of attribute html.
7 8 9 |
# File 'lib/canvas/services/front_matter_extractor.rb', line 7 def html @html end |