Class: Partyhat::Forums::ForumPost

Inherits:
Object
  • Object
show all
Defined in:
lib/partyhat/forums/forum_post.rb

Overview

TODO: Deleted post type TODO: Make sure it cannot be instantiated with invalid information (date in the future etc) TODO: Check for moderator posts

Instance Method Summary collapse

Constructor Details

#initialize(author, posted, contents) ⇒ ForumPost

Returns a new instance of ForumPost.



11
12
13
14
15
# File 'lib/partyhat/forums/forum_post.rb', line 11

def initialize author, posted, contents
  @author   = author
  @posted   = posted
  @contents = contents
end

Instance Method Details

#authorObject



17
18
19
# File 'lib/partyhat/forums/forum_post.rb', line 17

def author
  @author
end

#contentsObject



25
26
27
# File 'lib/partyhat/forums/forum_post.rb', line 25

def contents
  @contents
end

#postedObject



21
22
23
# File 'lib/partyhat/forums/forum_post.rb', line 21

def posted
  @posted
end