Class: GitTopic::Commands::Start

Inherits:
Object
  • Object
show all
Defined in:
lib/git_topic/commands/start.rb

Overview

this command starts topic to create branch

Instance Method Summary collapse

Constructor Details

#initialize(topic_name) ⇒ Start

Returns a new instance of Start.



7
8
9
# File 'lib/git_topic/commands/start.rb', line 7

def initialize(topic_name)
  @topic_name = topic_name
end

Instance Method Details

#executeObject



11
12
13
14
15
16
# File 'lib/git_topic/commands/start.rb', line 11

def execute
  create_branch
  summary = read_summary
  summary_to_branch summary
  puts "start `#{@topic_name}`"
end