Class: Tinycms::Post
- Inherits:
-
Object
- Object
- Tinycms::Post
- Defined in:
- lib/tinycms/post.rb
Instance Attribute Summary collapse
-
#author ⇒ Object
readonly
Returns the value of attribute author.
-
#content ⇒ Object
readonly
Returns the value of attribute content.
-
#content_plain_text ⇒ Object
readonly
Returns the value of attribute content_plain_text.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#slug ⇒ Object
readonly
Returns the value of attribute slug.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
-
#updated_at ⇒ Object
readonly
Returns the value of attribute updated_at.
Instance Method Summary collapse
-
#initialize(id:, title:, author:, content:, content_plain_text:, slug:, created_at:, updated_at:) ⇒ Post
constructor
A new instance of Post.
Constructor Details
#initialize(id:, title:, author:, content:, content_plain_text:, slug:, created_at:, updated_at:) ⇒ Post
Returns a new instance of Post.
5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/tinycms/post.rb', line 5 def initialize(id:, title:, author:, content:, content_plain_text:, slug:, created_at:, updated_at:) @id = id @title = title @author = @content = content @content_plain_text = content_plain_text @slug = slug @created_at = created_at @updated_at = updated_at end |
Instance Attribute Details
#author ⇒ Object (readonly)
Returns the value of attribute author.
17 18 19 |
# File 'lib/tinycms/post.rb', line 17 def @author end |
#content ⇒ Object (readonly)
Returns the value of attribute content.
17 18 19 |
# File 'lib/tinycms/post.rb', line 17 def content @content end |
#content_plain_text ⇒ Object (readonly)
Returns the value of attribute content_plain_text.
17 18 19 |
# File 'lib/tinycms/post.rb', line 17 def content_plain_text @content_plain_text end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
17 18 19 |
# File 'lib/tinycms/post.rb', line 17 def created_at @created_at end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
17 18 19 |
# File 'lib/tinycms/post.rb', line 17 def id @id end |
#slug ⇒ Object (readonly)
Returns the value of attribute slug.
17 18 19 |
# File 'lib/tinycms/post.rb', line 17 def slug @slug end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
17 18 19 |
# File 'lib/tinycms/post.rb', line 17 def title @title end |
#updated_at ⇒ Object (readonly)
Returns the value of attribute updated_at.
17 18 19 |
# File 'lib/tinycms/post.rb', line 17 def updated_at @updated_at end |