Class: Thredded::NullUserTopicReadState
- Inherits:
-
Object
- Object
- Thredded::NullUserTopicReadState
- Defined in:
- app/models/thredded/null_user_topic_read_state.rb
Instance Attribute Summary collapse
-
#posts_count ⇒ Object
readonly
Returns the value of attribute posts_count.
Instance Method Summary collapse
- #first_unread_post_page ⇒ Object
-
#initialize(posts_count:) ⇒ NullUserTopicReadState
constructor
A new instance of NullUserTopicReadState.
- #last_read_post_page ⇒ Object
- #page ⇒ Object
- #post_read?(_post) ⇒ Boolean
- #read? ⇒ Boolean
Constructor Details
#initialize(posts_count:) ⇒ NullUserTopicReadState
Returns a new instance of NullUserTopicReadState.
7 8 9 |
# File 'app/models/thredded/null_user_topic_read_state.rb', line 7 def initialize(posts_count:) @posts_count = posts_count end |
Instance Attribute Details
#posts_count ⇒ Object (readonly)
Returns the value of attribute posts_count.
5 6 7 |
# File 'app/models/thredded/null_user_topic_read_state.rb', line 5 def posts_count @posts_count end |
Instance Method Details
#first_unread_post_page ⇒ Object
23 24 25 |
# File 'app/models/thredded/null_user_topic_read_state.rb', line 23 def first_unread_post_page nil end |
#last_read_post_page ⇒ Object
27 28 29 |
# File 'app/models/thredded/null_user_topic_read_state.rb', line 27 def last_read_post_page 1 end |
#page ⇒ Object
11 12 13 |
# File 'app/models/thredded/null_user_topic_read_state.rb', line 11 def page 1 end |
#post_read?(_post) ⇒ Boolean
19 20 21 |
# File 'app/models/thredded/null_user_topic_read_state.rb', line 19 def post_read?(_post) false end |
#read? ⇒ Boolean
15 16 17 |
# File 'app/models/thredded/null_user_topic_read_state.rb', line 15 def read? false end |