Class: Lazylead::RecordsLink
- Inherits:
-
Records
- Object
- Requirement
- Attachment
- Records
- Lazylead::RecordsLink
- Defined in:
- lib/lazylead/task/accuracy/records_link.rb
Overview
Check that ticket has links to video record(s) with reproducing results.
Instance Attribute Summary
Attributes inherited from Requirement
Instance Method Summary collapse
-
#initialize(*urls) ⇒ RecordsLink
constructor
A new instance of RecordsLink.
- #link?(issue) ⇒ Boolean
- #passed(issue) ⇒ Object
Methods inherited from Records
Methods inherited from Attachment
Methods inherited from Requirement
Constructor Details
#initialize(*urls) ⇒ RecordsLink
Returns a new instance of RecordsLink.
30 31 32 33 |
# File 'lib/lazylead/task/accuracy/records_link.rb', line 30 def initialize(*urls) super([]) @urls = urls end |
Instance Method Details
#link?(issue) ⇒ Boolean
39 40 41 42 43 44 45 46 47 |
# File 'lib/lazylead/task/accuracy/records_link.rb', line 39 def link?(issue) return false if issue.description.nil? issue.description .split("\n") .reject(&:blank?) .flat_map(&:split) .reject(&:blank?) .any? { |word| @urls.any? { |u| word.start_with? u } } end |
#passed(issue) ⇒ Object
35 36 37 |
# File 'lib/lazylead/task/accuracy/records_link.rb', line 35 def passed(issue) link?(issue) || super(issue) end |