module GitCheckBit
takeltau git check bit
Public Instance Methods
git_check_bit()
click to toggle source
Backend method for git check bit. @return [Boolean] are we on the git bit branch?
# File lib/takeltau/git/check/bit.rb, line 7 def git_check_bit log.debug 'Check if we are on the git bit branch' return false unless git_check_workspace branch = _git_check_bit_get_branch log.debug "We are on git branch \"#{branch}\"" branch == config.active['git_bit_branch'] end
Private Instance Methods
_git_check_bit_get_branch()
click to toggle source
Get git branch.
# File lib/takeltau/git/check/bit.rb, line 21 def _git_check_bit_get_branch cmd_get_branch = config.active['cmd_git_check_bit_get_git_branch'] (run cmd_get_branch).chomp.split('/')[-1] end