Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/daun/rugged_daun.rb
Overview
Add convenience methods to grab information from git refs
Instance Method Summary collapse
-
#to_local_branch ⇒ Object
Grabs branch name from git remote refs.
-
#to_tag ⇒ Object
Grabs tag name from git tag refs.
Instance Method Details
#to_local_branch ⇒ Object
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_tag ⇒ Object
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 |