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:, created_at:, updated_at:) ⇒ Post

Returns a new instance of Post.



5
6
7
8
9
10
11
12
13
# File 'lib/tinycms/post.rb', line 5

def initialize(id:, title:, author:, content:, content_plain_text:, created_at:, updated_at:)
  @id = id
  @title = title
  @author = author
  @content = content
  @content_plain_text = content_plain_text
  @created_at = created_at
  @updated_at = updated_at
end

Instance Attribute Details

#authorObject (readonly)

Returns the value of attribute author.



15
16
17
# File 'lib/tinycms/post.rb', line 15

def author
  @author
end

#contentObject (readonly)

Returns the value of attribute content.



15
16
17
# File 'lib/tinycms/post.rb', line 15

def content
  @content
end

#content_plain_textObject (readonly)

Returns the value of attribute content_plain_text.



15
16
17
# File 'lib/tinycms/post.rb', line 15

def content_plain_text
  @content_plain_text
end

#created_atObject (readonly)

Returns the value of attribute created_at.



15
16
17
# File 'lib/tinycms/post.rb', line 15

def created_at
  @created_at
end

#idObject (readonly)

Returns the value of attribute id.



15
16
17
# File 'lib/tinycms/post.rb', line 15

def id
  @id
end

#titleObject (readonly)

Returns the value of attribute title.



15
16
17
# File 'lib/tinycms/post.rb', line 15

def title
  @title
end

#updated_atObject (readonly)

Returns the value of attribute updated_at.



15
16
17
# File 'lib/tinycms/post.rb', line 15

def updated_at
  @updated_at
end