Class: GitTopic::Commands::Edit

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

Overview

edit command edits branch description

Instance Method Summary collapse

Constructor Details

#initialize(topic_name) ⇒ Edit

Returns a new instance of Edit.



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

def initialize(topic_name)
  @topic_name = topic_name
end

Instance Method Details

#executeObject



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

def execute
  system("git branch --edit-description #{@topic_name}")
  true
rescue e
  puts e.message
  true
end