Class: CircleCI::CoverageReporter::Reporters::Link::LinkReport
- Inherits:
-
Struct
- Object
- Struct
- CircleCI::CoverageReporter::Reporters::Link::LinkReport
- Defined in:
- lib/circleci/coverage_reporter/reporters/link.rb
Instance Attribute Summary collapse
-
#base_url ⇒ String?
The current value of base_url.
-
#name ⇒ String
The current value of name.
-
#previous_url ⇒ String?
The current value of previous_url.
-
#url ⇒ String
The current value of url.
Instance Method Summary collapse
Instance Attribute Details
#base_url ⇒ String?
Returns the current value of base_url.
11 12 13 |
# File 'lib/circleci/coverage_reporter/reporters/link.rb', line 11 def base_url @base_url end |
#name ⇒ String
Returns the current value of name.
11 12 13 |
# File 'lib/circleci/coverage_reporter/reporters/link.rb', line 11 def name @name end |
#previous_url ⇒ String?
Returns the current value of previous_url.
11 12 13 |
# File 'lib/circleci/coverage_reporter/reporters/link.rb', line 11 def previous_url @previous_url end |
#url ⇒ String
Returns the current value of url.
11 12 13 |
# File 'lib/circleci/coverage_reporter/reporters/link.rb', line 11 def url @url end |
Instance Method Details
#to_s ⇒ String
13 14 15 16 17 18 19 |
# File 'lib/circleci/coverage_reporter/reporters/link.rb', line 13 def to_s links = [] links << "[master](#{base_url})" if base_url links << "[previous](#{previous_url})" if previous_url link = links.empty? ? nil : " (#{links.join(', ')})" "[#{name}](#{url})#{link}" end |