lib/git_presenter/presentation.rb in git_presenter-1.0.0 vs lib/git_presenter/presentation.rb in git_presenter-1.1.0
- old
+ new
@@ -1,9 +1,10 @@
class GitPresenter::Presentation
attr_reader :slides, :current_slide
def initialize(presentation)
+ @branch = presentation["branch"]
@slides = presentation["slides"].map{|slide| GitPresenter::Slide.new(slide["slide"])}
@current_slide = slides.first
end
def command_for(command)
@@ -37,10 +38,10 @@
def status_line
"#{position+1}/#{total_slides} >"
end
def exit
- `git checkout -q master`
+ `git checkout -q #{@branch}`
:exit
end
def position
slides.index(@current_slide)