Class: Twterm::Tab::UserTab
- Inherits:
-
Object
- Object
- Twterm::Tab::UserTab
- Includes:
- StatusesTab
- Defined in:
- lib/twterm/tab/user_tab.rb
Instance Attribute Summary collapse
-
#user ⇒ Object
readonly
Returns the value of attribute user.
Attributes included from Base
Instance Method Summary collapse
- #fetch ⇒ Object
-
#initialize(user) ⇒ UserTab
constructor
A new instance of UserTab.
Methods included from StatusesTab
#append, #delete_status, #favorite, #open_link, #prepend, #reply, #respond_to_key, #retweet, #show_conversation, #show_user, #update
Methods included from AutoReloadable
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
#==, #close, #refresh, #respond_to_key
Constructor Details
#initialize(user) ⇒ UserTab
Returns a new instance of UserTab.
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/twterm/tab/user_tab.rb', line 8 def initialize(user) fail ArgumentError, 'argument must be an instance of User class' unless user.is_a? User super() @user = user @title = "@#{user.screen_name}" fetch { move_to_top } auto_reload(120) { fetch } end |
Instance Attribute Details
#user ⇒ Object (readonly)
Returns the value of attribute user.
6 7 8 |
# File 'lib/twterm/tab/user_tab.rb', line 6 def user @user end |