Method: Twterm::Notifier#initialize
- Defined in:
- lib/twterm/notifier.rb
#initialize ⇒ Notifier
Returns a new instance of Notifier.
6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/twterm/notifier.rb', line 6 def initialize @window = stdscr.subwin(1, stdscr.maxx, stdscr.maxy - 2, 0) @queue = Queue.new Thread.new do while notification = @queue.pop show(notification) sleep 3 show end end end |