lib/git_presenter.rb in git_presenter-1.1.0 vs lib/git_presenter.rb in git_presenter-1.2.0
- old
+ new
@@ -5,10 +5,11 @@
class GitPresenter
require_relative 'git_presenter/presentation'
require_relative 'git_presenter/controller'
require_relative 'git_presenter/slide'
+ require_relative 'git_presenter/shell'
def initialize(current_dir, interactive=true)
@controller = Controller.new(current_dir)
@interactive = interactive
end
@@ -22,12 +23,19 @@
enter_run_loop
end
elsif command == 'update'
@controller.update_presentation
else
+ if @presentation.nil?
+ @presentation = @controller.load_presentation
+ end
puts @presentation.execute(command)
end
@presentation
+ end
+
+ def current_slide
+ @presentation.current_slide
end
private
def enter_run_loop