Class: Dimples::Post
Overview
A single post for a site.
Constant Summary
Constants inherited from Entry
Entry::DEFAULT_FILENAME, Entry::FRONT_MATTER_PATTERN
Class Attribute Summary collapse
-
.markdown ⇒ Object
readonly
Returns the value of attribute markdown.
Attributes inherited from Entry
#contents, #metadata, #path, #rendered_contents
Instance Method Summary collapse
-
#initialize(path:) ⇒ Post
constructor
A new instance of Post.
- #render(context: nil) ⇒ Object
- #slug ⇒ Object
Methods inherited from Entry
#method_missing, #parse_metadata, #respond_to_missing?
Constructor Details
#initialize(path:) ⇒ Post
Returns a new instance of Post.
12 13 14 |
# File 'lib/dimples/post.rb', line 12 def initialize(path:) super(source: Pathname.new(path)) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Dimples::Entry
Class Attribute Details
.markdown ⇒ Object (readonly)
Returns the value of attribute markdown.
9 10 11 |
# File 'lib/dimples/post.rb', line 9 def markdown @markdown end |