Class: TtySlides
- Inherits:
-
Object
- Object
- TtySlides
- Defined in:
- lib/tty_slides.rb,
lib/tty_slides/version.rb
Defined Under Namespace
Modules: Options Classes: MainWindow, QandAClient, QandAWindow, SlideList
Constant Summary collapse
- VERSION =
"0.0.3"
Instance Method Summary collapse
-
#initialize(title = '') ⇒ TtySlides
constructor
A new instance of TtySlides.
- #start ⇒ Object
Constructor Details
#initialize(title = '') ⇒ TtySlides
Returns a new instance of TtySlides.
18 19 20 21 22 23 24 25 26 27 |
# File 'lib/tty_slides.rb', line 18 def initialize title='' @title = title = Options.parse! @height = Curses.lines @width = Curses.cols = SlideList.new(.start_at) setup_windows exit_handlers setup_q_and_a end |
Instance Method Details
#start ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/tty_slides.rb', line 29 def start CML.new(@main_window, File.read(.next)).render loop do case STDIN.getch when /b/i CML.new(@main_window, File.read(.previous)).render when /q/i exit else CML.new(@main_window, File.read(.next)).render end end end |