Class: Twterm::Tab::Statuses::Mentions
- Inherits:
-
AbstractStatusesTab
- Object
- AbstractTab
- AbstractStatusesTab
- Twterm::Tab::Statuses::Mentions
- Includes:
- Subscriber
- Defined in:
- lib/twterm/tab/statuses/mentions.rb
Instance Method Summary collapse
- #close ⇒ Object
- #fetch ⇒ Object
-
#initialize(app, client) ⇒ Mentions
constructor
A new instance of Mentions.
- #title ⇒ Object
Methods included from Subscriber
included, #subscribe, #unsubscribe
Methods inherited from AbstractStatusesTab
#append, #delete, #destroy_status, #drawable_item_count, #favorite, #items, #matches?, #open_link, #prepend, #quote, #reply, #respond_to_key, #retweet, #search_query_window, #show_conversation, #show_user, #statuses, #total_item_count
Methods included from Utils
Methods included from Loadable
#initially_loaded!, #initially_loaded?
Methods included from Twterm::Tab::Searchable
#matches?, #search_query_window
Methods included from Twterm::Tab::Scrollable
Methods included from Publisher
Methods inherited from AbstractTab
#==, #find_or_fetch_list, #find_or_fetch_status, #find_or_fetch_user, #render, #respond_to_key
Constructor Details
#initialize(app, client) ⇒ Mentions
Returns a new instance of Mentions.
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/twterm/tab/statuses/mentions.rb', line 18 def initialize(app, client) fail ArgumentError, 'argument must be an instance of Client class' unless client.is_a? Client super(app, client) subscribe(Event::Status::Mention) { |e| prepend(e.status) } reload.then do |statuses| initially_loaded! statuses.each { |s| append(s) } scroller.move_to_top end @auto_reloader = Scheduler.new(300) { reload } end |
Instance Method Details
#close ⇒ Object
10 11 12 |
# File 'lib/twterm/tab/statuses/mentions.rb', line 10 def close fail NotClosableError end |
#fetch ⇒ Object
14 15 16 |
# File 'lib/twterm/tab/statuses/mentions.rb', line 14 def fetch client.mentions end |
#title ⇒ Object
34 35 36 |
# File 'lib/twterm/tab/statuses/mentions.rb', line 34 def title 'Mentions'.freeze end |