Class: Twterm::Tab::Statuses::Home
- Inherits:
-
AbstractStatusesTab
- Object
- AbstractTab
- AbstractStatusesTab
- Twterm::Tab::Statuses::Home
- Includes:
- Subscriber, Utils
- Defined in:
- lib/twterm/tab/statuses/home.rb
Instance Attribute Summary
Attributes inherited from AbstractTab
Instance Method Summary collapse
- #close ⇒ Object
- #fetch ⇒ Object
-
#initialize(app, client) ⇒ Home
constructor
A new instance of Home.
- #title ⇒ Object
Methods included from Utils
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, #show_conversation, #show_user, #statuses, #total_item_count
Methods included from Loadable
#initially_loaded!, #initially_loaded?
Methods included from Twterm::Tab::Searchable
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) ⇒ Home
Returns a new instance of Home.
21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/twterm/tab/statuses/home.rb', line 21 def initialize(app, client) super(app, client) subscribe(Event::Status::Timeline) { |e| prepend(e.status) } reload.then do initially_loaded! scroller.move_to_top end @auto_reloader = Scheduler.new(180) { reload } end |
Instance Method Details
#close ⇒ Object
13 14 15 |
# File 'lib/twterm/tab/statuses/home.rb', line 13 def close fail NotClosableError end |
#fetch ⇒ Object
17 18 19 |
# File 'lib/twterm/tab/statuses/home.rb', line 17 def fetch client.home_timeline end |
#title ⇒ Object
34 35 36 |
# File 'lib/twterm/tab/statuses/home.rb', line 34 def title 'Home'.freeze end |