Class: FileContent
- Inherits:
-
Object
- Object
- FileContent
- Defined in:
- lib/rollin/article.rb
Instance Attribute Summary collapse
-
#content ⇒ Object
readonly
Returns the value of attribute content.
-
#yaml_front_matter ⇒ Object
readonly
Returns the value of attribute yaml_front_matter.
Instance Method Summary collapse
- #has_front_matter? ⇒ Boolean
-
#initialize(yaml_front_matter, content) ⇒ FileContent
constructor
A new instance of FileContent.
Constructor Details
#initialize(yaml_front_matter, content) ⇒ FileContent
Returns a new instance of FileContent.
101 102 103 104 |
# File 'lib/rollin/article.rb', line 101 def initialize(yaml_front_matter, content) @yaml_front_matter = yaml_front_matter @content = content end |
Instance Attribute Details
#content ⇒ Object (readonly)
Returns the value of attribute content.
99 100 101 |
# File 'lib/rollin/article.rb', line 99 def content @content end |
#yaml_front_matter ⇒ Object (readonly)
Returns the value of attribute yaml_front_matter.
99 100 101 |
# File 'lib/rollin/article.rb', line 99 def yaml_front_matter @yaml_front_matter end |
Instance Method Details
#has_front_matter? ⇒ Boolean
106 107 108 |
# File 'lib/rollin/article.rb', line 106 def has_front_matter? !yaml_front_matter.nil? end |