Class: Avmtrf1::Gitlab::Commit
- Inherits:
-
Object
- Object
- Avmtrf1::Gitlab::Commit
- Defined in:
- lib/avmtrf1/gitlab/commit.rb
Instance Method Summary collapse
- #markdown_link(object_type = 'commit') ⇒ String
- #textile_link(object_type = 'commit') ⇒ String
- #to_s ⇒ Object
- #web_url(object_type = 'commit') ⇒ Object
Instance Method Details
#markdown_link(object_type = 'commit') ⇒ String
17 18 19 |
# File 'lib/avmtrf1/gitlab/commit.rb', line 17 def markdown_link(object_type = 'commit') "[#{git_commit.abbreviated_commit_hash}|#{web_url(object_type)}]" end |
#textile_link(object_type = 'commit') ⇒ String
22 23 24 |
# File 'lib/avmtrf1/gitlab/commit.rb', line 22 def textile_link(object_type = 'commit') "\"#{git_commit.abbreviated_commit_hash}\":#{web_url(object_type)}" end |
#to_s ⇒ Object
12 13 14 |
# File 'lib/avmtrf1/gitlab/commit.rb', line 12 def to_s source end |
#web_url(object_type = 'commit') ⇒ Object
26 27 28 |
# File 'lib/avmtrf1/gitlab/commit.rb', line 26 def web_url(object_type = 'commit') "#{repository.web_url}/#{object_type}/#{git_commit.commit_hash}" end |