Module: Twterm::Tab::Base
- Includes:
- Curses
- Included in:
- New::List, New::Search, New::Start, Scrollable, StatusesTab
- Defined in:
- lib/twterm/tab/base.rb
Instance Attribute Summary collapse
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Instance Method Summary collapse
- #==(other) ⇒ Object
- #close ⇒ Object
- #initialize ⇒ Object
- #refresh ⇒ Object
- #respond_to_key(_) ⇒ Object
Instance Attribute Details
#title ⇒ Object (readonly)
Returns the value of attribute title.
6 7 8 |
# File 'lib/twterm/tab/base.rb', line 6 def title @title end |
Instance Method Details
#==(other) ⇒ Object
30 31 32 |
# File 'lib/twterm/tab/base.rb', line 30 def ==(other) self.equal?(other) end |
#close ⇒ Object
22 23 24 |
# File 'lib/twterm/tab/base.rb', line 22 def close @window.close end |
#initialize ⇒ Object
8 9 10 |
# File 'lib/twterm/tab/base.rb', line 8 def initialize @window = stdscr.subwin(stdscr.maxy - 5, stdscr.maxx - 30, 3, 0) end |
#refresh ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'lib/twterm/tab/base.rb', line 12 def refresh return if @refreshing || closed? || TabManager.instance.current_tab.object_id != object_id @refreshing = true Thread.new do update @refreshing = false end end |
#respond_to_key(_) ⇒ Object
26 27 28 |
# File 'lib/twterm/tab/base.rb', line 26 def respond_to_key(_) fail NotImplementedError, 'respond_to_key method must be implemented' end |