Class: Avmtrf1::Gitlab::Commit

Inherits:
Object
  • Object
show all
Defined in:
lib/avmtrf1/gitlab/commit.rb

Instance Method Summary collapse

Instance Method Details

Returns:

  • (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

Returns:

  • (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_sObject



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