Class: Anchorman::Repo
- Inherits:
-
Struct
- Object
- Struct
- Anchorman::Repo
- Defined in:
- lib/anchorman/repo.rb
Instance Attribute Summary collapse
-
#git_repo ⇒ Object
Returns the value of attribute git_repo.
Instance Method Summary collapse
Instance Attribute Details
#git_repo ⇒ Object
Returns the value of attribute git_repo
2 3 4 |
# File 'lib/anchorman/repo.rb', line 2 def git_repo @git_repo end |
Instance Method Details
#commit_url(sha) ⇒ Object
15 16 17 18 19 |
# File 'lib/anchorman/repo.rb', line 15 def commit_url(sha) return sha unless is_github? "[#{sha}](#{github_url_for 'commit', sha})" end |
#is_github? ⇒ Boolean
8 9 10 11 12 13 |
# File 'lib/anchorman/repo.rb', line 8 def is_github? remote && remote.name == "origin" && remote.url && remote.url.match(/github\.com/) end |
#remote ⇒ Object
4 5 6 |
# File 'lib/anchorman/repo.rb', line 4 def remote git_repo.remote end |