Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/daun/rugged_daun.rb

Overview

Add convenience methods to grab information from git refs

Instance Method Summary collapse

Instance Method Details

#to_local_branchObject

Grabs branch name from git remote refs.



146
147
148
# File 'lib/daun/rugged_daun.rb', line 146

def to_local_branch
  self[%r{refs/remotes/origin/(.*)}, 1]
end

#to_tagObject

Grabs tag name from git tag refs.



151
152
153
# File 'lib/daun/rugged_daun.rb', line 151

def to_tag
  self[%r{refs/tags/(.*)}, 1]
end