Class: Twterm::Tab::ListTab
- Inherits:
-
Object
- Object
- Twterm::Tab::ListTab
- Includes:
- Dumpable, StatusesTab
- Defined in:
- lib/twterm/tab/list_tab.rb
Instance Attribute Summary collapse
-
#list ⇒ Object
readonly
Returns the value of attribute list.
Attributes included from Base
Instance Method Summary collapse
- #==(other) ⇒ Object
- #close ⇒ Object
- #dump ⇒ Object
- #fetch ⇒ Object
-
#initialize(list_id) ⇒ ListTab
constructor
A new instance of ListTab.
Methods included from Dumpable
Methods included from StatusesTab
#append, #delete, #destroy_status, #favorite, #open_link, #prepend, #reply, #respond_to_key, #retweet, #show_conversation, #show_user, #statuses, #touch_statuses, #update
Methods included from Scrollable
#count, #draw_scroll_bar, #index, #item_appended, #item_prepended, #last, #move_down, #move_to_bottom, #move_to_top, #move_up, #offset, #offset_from_bottom, #respond_to_key, #update_scrollbar_length
Methods included from Base
Constructor Details
#initialize(list_id) ⇒ ListTab
Returns a new instance of ListTab.
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/twterm/tab/list_tab.rb', line 9 def initialize(list_id) super() List.find_or_fetch(list_id) do |list| @list = list @title = @list.full_name TabManager.instance.refresh_window fetch { move_to_top } @auto_reloader = Scheduler.new(300) { fetch } end end |
Instance Attribute Details
#list ⇒ Object (readonly)
Returns the value of attribute list.
7 8 9 |
# File 'lib/twterm/tab/list_tab.rb', line 7 def list @list end |
Instance Method Details
#==(other) ⇒ Object
35 36 37 |
# File 'lib/twterm/tab/list_tab.rb', line 35 def ==(other) other.is_a?(self.class) && list == other.list end |
#close ⇒ Object
30 31 32 33 |
# File 'lib/twterm/tab/list_tab.rb', line 30 def close @auto_reloader.kill if @auto_reloader super end |
#dump ⇒ Object
39 40 41 |
# File 'lib/twterm/tab/list_tab.rb', line 39 def dump @list.id end |