Class: Augit::Repo
- Inherits:
-
Object
- Object
- Augit::Repo
- Defined in:
- lib/augit/repo.rb
Instance Attribute Summary collapse
-
#regexp ⇒ Object
readonly
Returns the value of attribute regexp.
Instance Method Summary collapse
- #branch_names ⇒ Object
-
#initialize(options = {}) ⇒ Repo
constructor
A new instance of Repo.
- #merged_branches ⇒ Object
- #origin ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Repo
Returns a new instance of Repo.
5 6 7 |
# File 'lib/augit/repo.rb', line 5 def initialize( = {}) @regexp = [:regexp] end |
Instance Attribute Details
#regexp ⇒ Object (readonly)
Returns the value of attribute regexp.
3 4 5 |
# File 'lib/augit/repo.rb', line 3 def regexp @regexp end |
Instance Method Details
#branch_names ⇒ Object
14 15 16 |
# File 'lib/augit/repo.rb', line 14 def branch_names `git branch -r | #{sanitize_string}`.split("\n").uniq end |
#merged_branches ⇒ Object
18 19 20 |
# File 'lib/augit/repo.rb', line 18 def merged_branches `git branch -r --merged master | #{sanitize_string}`.split("\n").uniq end |
#origin ⇒ Object
9 10 11 12 |
# File 'lib/augit/repo.rb', line 9 def origin origin = `git remote show -n origin | grep "Fetch URL:"`.match(/.*\:(.*)\./) origin.nil? ? origin : origin[1] end |