Class: Tinycms::Post

Inherits:
Object
  • Object
show all
Defined in:
lib/tinycms/post.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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 = author
  @content = content
  @content_plain_text = content_plain_text
  @slug = slug
  @created_at = created_at
  @updated_at = updated_at
end

Instance Attribute Details

#authorObject (readonly)

Returns the value of attribute author.



17
18
19
# File 'lib/tinycms/post.rb', line 17

def author
  @author
end

#contentObject (readonly)

Returns the value of attribute content.



17
18
19
# File 'lib/tinycms/post.rb', line 17

def content
  @content
end

#content_plain_textObject (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_atObject (readonly)

Returns the value of attribute created_at.



17
18
19
# File 'lib/tinycms/post.rb', line 17

def created_at
  @created_at
end

#idObject (readonly)

Returns the value of attribute id.



17
18
19
# File 'lib/tinycms/post.rb', line 17

def id
  @id
end

#slugObject (readonly)

Returns the value of attribute slug.



17
18
19
# File 'lib/tinycms/post.rb', line 17

def slug
  @slug
end

#titleObject (readonly)

Returns the value of attribute title.



17
18
19
# File 'lib/tinycms/post.rb', line 17

def title
  @title
end

#updated_atObject (readonly)

Returns the value of attribute updated_at.



17
18
19
# File 'lib/tinycms/post.rb', line 17

def updated_at
  @updated_at
end