Class: RTask::UI::CursesInterface::IncludedFiles

Inherits:
Curses::Window
  • Object
show all
Defined in:
lib/rtask/ui/curses.rb

Instance Method Summary collapse

Constructor Details

#initialize(files) ⇒ IncludedFiles

Returns a new instance of IncludedFiles.



301
302
303
304
305
306
307
308
309
310
# File 'lib/rtask/ui/curses.rb', line 301

def initialize(files)
  @files = files
  window = ::Curses.stdscr
  window.clear
  super(window.subwin(window.maxy, window.maxx, 0, 0))
  draw
  getch
  close
  MAIN_WINDOW.draw
end

Instance Method Details

#drawObject



312
313
314
315
316
317
318
319
320
321
322
# File 'lib/rtask/ui/curses.rb', line 312

def draw
  setpos(0, 0)
  standout
  addstr "Manifest(included files)".center(maxx)
  standend
  @files.each_with_index do |file, idx|
    setpos(idx+1, 0)
    addstr file
  end
  refresh
end