class GitTopic::Commands::Show
show command shows branch description
Public Class Methods
new(topic_name)
click to toggle source
# File lib/git_topic/commands/show.rb, line 7 def initialize(topic_name) if topic_name.nil? command = 'git rev-parse --abbrev-ref HEAD' _stdin, stdout, _stderr, _wait_thr = *Open3.popen3(command) topic_name = stdout.readline.chop end @topic_name = topic_name end
Public Instance Methods
execute()
click to toggle source
# File lib/git_topic/commands/show.rb, line 16 def execute config_key = "branch.#{@topic_name}.description" system("git config #{config_key}") end