Class: Tinycms::Blog

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

Returns the value of attribute created_at.



14
15
16
# File 'lib/tinycms/blog.rb', line 14

def created_at
  @created_at
end

#descriptionObject (readonly)

Returns the value of attribute description.



14
15
16
# File 'lib/tinycms/blog.rb', line 14

def description
  @description
end

#idObject (readonly)

Returns the value of attribute id.



14
15
16
# File 'lib/tinycms/blog.rb', line 14

def id
  @id
end

#nameObject (readonly)

Returns the value of attribute name.



14
15
16
# File 'lib/tinycms/blog.rb', line 14

def name
  @name
end

#postsObject (readonly)

Returns the value of attribute posts.



14
15
16
# File 'lib/tinycms/blog.rb', line 14

def posts
  @posts
end

#updated_atObject (readonly)

Returns the value of attribute updated_at.



14
15
16
# File 'lib/tinycms/blog.rb', line 14

def updated_at
  @updated_at
end