Class: Thredded::NullUserTopicReadState

Inherits:
Object
  • Object
show all
Defined in:
app/models/thredded/null_user_topic_read_state.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(posts_count:) ⇒ 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_countObject (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_pageObject


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_pageObject


27
28
29
# File 'app/models/thredded/null_user_topic_read_state.rb', line 27

def last_read_post_page
  1
end

#pageObject


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