Class: Lazylead::Attachment

Inherits:
Requirement show all
Defined in:
lib/lazylead/task/accuracy/attachment.rb

Overview

Check that ticket has an attachment.

Direct Known Subclasses

Logs, Records

Instance Attribute Summary

Attributes inherited from Requirement

#desc, #field, #score

Instance Method Summary collapse

Methods inherited from Requirement

#blank?, #non_blank?

Constructor Details

#initialize(desc, score, field) ⇒ Attachment

Returns a new instance of Attachment.



30
31
32
# File 'lib/lazylead/task/accuracy/attachment.rb', line 30

def initialize(desc, score, field)
  super(desc, score, field)
end

Instance Method Details

#matching(attachment) ⇒ Object

Check a single attachment from ticket. Potential extension point for custom verification logic.



40
41
42
# File 'lib/lazylead/task/accuracy/attachment.rb', line 40

def matching(attachment)
  !attachment.nil?
end

#passed(issue) ⇒ Object



34
35
36
# File 'lib/lazylead/task/accuracy/attachment.rb', line 34

def passed(issue)
  issue.attachments.any?(&method(:matching))
end