Class: Tinycms::Blog
- Inherits:
-
Object
- Object
- Tinycms::Blog
- Defined in:
- lib/tinycms/blog.rb
Instance Attribute Summary collapse
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#posts ⇒ Object
readonly
Returns the value of attribute posts.
-
#updated_at ⇒ Object
readonly
Returns the value of attribute updated_at.
Instance Method Summary collapse
-
#initialize(id:, name:, description:, posts: [], created_at:, updated_at:) ⇒ Blog
constructor
A new instance of Blog.
Constructor Details
#initialize(id:, name:, description:, posts: [], created_at:, updated_at:) ⇒ Blog
Returns a new instance of Blog.
5 6 7 8 9 10 11 12 |
# File 'lib/tinycms/blog.rb', line 5 def initialize(id:, name:, description:, posts: [], created_at:, updated_at:) @id = id @name = name @description = description @posts = posts @created_at = created_at @updated_at = updated_at end |
Instance Attribute Details
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
14 15 16 |
# File 'lib/tinycms/blog.rb', line 14 def created_at @created_at end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
14 15 16 |
# File 'lib/tinycms/blog.rb', line 14 def description @description end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
14 15 16 |
# File 'lib/tinycms/blog.rb', line 14 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
14 15 16 |
# File 'lib/tinycms/blog.rb', line 14 def name @name end |
#posts ⇒ Object (readonly)
Returns the value of attribute posts.
14 15 16 |
# File 'lib/tinycms/blog.rb', line 14 def posts @posts end |
#updated_at ⇒ Object (readonly)
Returns the value of attribute updated_at.
14 15 16 |
# File 'lib/tinycms/blog.rb', line 14 def updated_at @updated_at end |