Class: Lazylead::Requirement
- Inherits:
-
Object
- Object
- Lazylead::Requirement
- Defined in:
- lib/lazylead/task/accuracy/requirement.rb
Overview
An single requirement regarding ticket format.
Direct Known Subclasses
AffectedBuild, Attachment, Environment, Servers, Stacktrace, Testcase, Wiki
Instance Attribute Summary collapse
-
#desc ⇒ Object
readonly
Returns the value of attribute desc.
-
#field ⇒ Object
readonly
Returns the value of attribute field.
-
#score ⇒ Object
readonly
Returns the value of attribute score.
Instance Method Summary collapse
- #blank?(issue, field) ⇒ Boolean
-
#initialize(desc, score, field) ⇒ Requirement
constructor
A new instance of Requirement.
- #non_blank?(issue, field) ⇒ Boolean
- #passed(_) ⇒ Object
Constructor Details
#initialize(desc, score, field) ⇒ Requirement
Returns a new instance of Requirement.
30 31 32 33 34 |
# File 'lib/lazylead/task/accuracy/requirement.rb', line 30 def initialize(desc, score, field) @desc = desc @score = score @field = field end |
Instance Attribute Details
#desc ⇒ Object (readonly)
Returns the value of attribute desc.
28 29 30 |
# File 'lib/lazylead/task/accuracy/requirement.rb', line 28 def desc @desc end |
#field ⇒ Object (readonly)
Returns the value of attribute field.
28 29 30 |
# File 'lib/lazylead/task/accuracy/requirement.rb', line 28 def field @field end |
#score ⇒ Object (readonly)
Returns the value of attribute score.
28 29 30 |
# File 'lib/lazylead/task/accuracy/requirement.rb', line 28 def score @score end |
Instance Method Details
#blank?(issue, field) ⇒ Boolean
40 41 42 43 |
# File 'lib/lazylead/task/accuracy/requirement.rb', line 40 def blank?(issue, field) return false if issue.nil? issue.fields[field].nil? || issue.fields[field].blank? end |
#non_blank?(issue, field) ⇒ Boolean
45 46 47 |
# File 'lib/lazylead/task/accuracy/requirement.rb', line 45 def non_blank?(issue, field) !blank? issue, field end |
#passed(_) ⇒ Object
36 37 38 |
# File 'lib/lazylead/task/accuracy/requirement.rb', line 36 def passed(_) true end |