Sha256: 0e506f2cf599d5b9cee6150fb52799dee4d04e2ece970ae0e5736b5fc99a1922
Contents?: true
Size: 547 Bytes
Versions: 2
Compression:
Stored size: 547 Bytes
Contents
require 'colorize' def current_branch system "git rev-parse --abbrev-ref HEAD" end def delete_remote_branch(branch_name) system("git push --delete origin #{branch_name}") end def show(message, type = :success) color = case type when :success :green when :warning :red when :normal :white else raise 'Unknown prompt type' end puts message.send(color) end def positive_response?(message, type = :normal) show("#{message} (y/n)", type) STDIN.gets.chomp =~ /y/ end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
legit-0.0.4 | lib/legit_helper.rb |
legit-0.0.2 | lib/legit_helper.rb |