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

Instance Method Summary collapse

Instance Attribute Details

#titleObject (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

#closeObject



22
23
24
# File 'lib/twterm/tab/base.rb', line 22

def close
  @window.close
end

#initializeObject



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

#refreshObject



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