Module: GitBreeze::Branch
- Defined in:
- lib/git_breeze/branch.rb
Class Method Summary collapse
Class Method Details
.current ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/git_breeze/branch.rb', line 10 def self.current branch_path = `git symbolic-ref HEAD` Repository.ensure_exists unless exit_successful? branch_path[%r{refs/heads/(.+)}, 1] || '' end |
.story_number ⇒ Object
6 7 8 |
# File 'lib/git_breeze/branch.rb', line 6 def self.story_number current[/#?(\d{6,10})/, 1] end |