Class: PGit::Bilateral::HandleChooseStory

Inherits:
ResponseHandler show all
Defined in:
lib/pgit/bilateral/handle_choose_story.rb

Instance Attribute Summary

Attributes inherited from ResponseHandler

#question

Instance Method Summary collapse

Methods inherited from ResponseHandler

#execute!

Constructor Details

#initialize(options) ⇒ HandleChooseStory

Returns a new instance of HandleChooseStory.



6
7
8
9
10
11
12
13
14
# File 'lib/pgit/bilateral/handle_choose_story.rb', line 6

def initialize(options)
  @response = options.fetch(:response)
  @stories = options.fetch(:stories)
  @response_handlers = [PGit::Bilateral::HandleBack]
  name_parser = PGit::StoryBranch::NameParser.new(chosen_story)
  story_branch = PGit::StoryBranch.new(name_parser)

  story_branch.start
end