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?, #initialize, #non_blank?

Constructor Details

This class inherits a constructor from Lazylead::Requirement

Instance Method Details

#matches?(attachment) ⇒ Boolean

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

Returns:

  • (Boolean)


36
37
38
# File 'lib/lazylead/task/accuracy/attachment.rb', line 36

def matches?(attachment)
  !attachment.nil?
end

#passed(issue) ⇒ Object



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

def passed(issue)
  issue.attachments.any? { |a| matches?(a) }
end