Class: Lazylead::Task::When
- Inherits:
-
Object
- Object
- Lazylead::Task::When
- Extended by:
- Forwardable
- Defined in:
- lib/lazylead/task/alert/alertif.rb
Overview
The conditions for the issue inspection.
Instance Method Summary collapse
-
#initialize(issue, opts) ⇒ When
constructor
A new instance of When.
-
#last ⇒ Object
The last comment in ticket.
- #matches ⇒ Object
Constructor Details
#initialize(issue, opts) ⇒ When
Returns a new instance of When.
59 60 61 62 |
# File 'lib/lazylead/task/alert/alertif.rb', line 59 def initialize(issue, opts) @issue = issue @opts = opts end |
Instance Method Details
#last ⇒ Object
The last comment in ticket
70 71 72 |
# File 'lib/lazylead/task/alert/alertif.rb', line 70 def last @last ||= @issue.comments.last end |
#matches ⇒ Object
64 65 66 67 |
# File 'lib/lazylead/task/alert/alertif.rb', line 64 def matches return false if @opts[:rules].nil? @opts[:rules].all? { |r| r.passed(@issue, @opts) } end |