Class: Post
- Inherits:
-
Object
- Object
- Post
- Defined in:
- lib/models/post.rb
Overview
An object representing a post on the Jekyll website
Instance Attribute Summary collapse
-
#author ⇒ Object
Returns the value of attribute author.
-
#contents ⇒ Object
Returns the value of attribute contents.
-
#file_path ⇒ Object
Path to the markdown post starting at the root of the repository.
-
#github_ref ⇒ Object
The GitHub ref the post’s markdown is at.
-
#hero ⇒ Object
Returns the value of attribute hero.
-
#images ⇒ Object
Returns the value of attribute images.
-
#overlay ⇒ Object
Returns the value of attribute overlay.
-
#tags ⇒ Object
Returns the value of attribute tags.
-
#title ⇒ Object
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize ⇒ Post
constructor
A new instance of Post.
Constructor Details
#initialize ⇒ Post
27 28 29 |
# File 'lib/models/post.rb', line 27 def initialize @images = [] end |
Instance Attribute Details
#author ⇒ Object
Returns the value of attribute author.
15 16 17 |
# File 'lib/models/post.rb', line 15 def end |
#contents ⇒ Object
Returns the value of attribute contents.
18 19 20 |
# File 'lib/models/post.rb', line 18 def contents @contents end |
#file_path ⇒ Object
Path to the markdown post starting at the root of the repository
21 22 23 |
# File 'lib/models/post.rb', line 21 def file_path @file_path end |
#github_ref ⇒ Object
The GitHub ref the post’s markdown is at. This is used to indicate whether a post is in PR or not
24 25 26 |
# File 'lib/models/post.rb', line 24 def github_ref @github_ref end |
#hero ⇒ Object
Returns the value of attribute hero.
16 17 18 |
# File 'lib/models/post.rb', line 16 def hero @hero end |
#images ⇒ Object
Returns the value of attribute images.
25 26 27 |
# File 'lib/models/post.rb', line 25 def images @images end |
#overlay ⇒ Object
Returns the value of attribute overlay.
17 18 19 |
# File 'lib/models/post.rb', line 17 def end |
#tags ⇒ Object
Returns the value of attribute tags.
19 20 21 |
# File 'lib/models/post.rb', line 19 def end |
#title ⇒ Object
Returns the value of attribute title.
14 15 16 |
# File 'lib/models/post.rb', line 14 def title @title end |