Class: Danger::MatchesInDiff
- Inherits:
-
Struct
- Object
- Struct
- Danger::MatchesInDiff
- Defined in:
- lib/todoist/diff_todo_finder.rb
Overview
Identify todos in a single diff
Defined Under Namespace
Instance Attribute Summary collapse
-
#diff ⇒ Object
Returns the value of attribute diff.
-
#matches ⇒ Object
Returns the value of attribute matches.
Instance Method Summary collapse
Instance Attribute Details
#diff ⇒ Object
Returns the value of attribute diff
35 36 37 |
# File 'lib/todoist/diff_todo_finder.rb', line 35 def diff @diff end |
#matches ⇒ Object
Returns the value of attribute matches
35 36 37 |
# File 'lib/todoist/diff_todo_finder.rb', line 35 def matches @matches end |
Instance Method Details
#all_todos ⇒ Object
40 41 42 |
# File 'lib/todoist/diff_todo_finder.rb', line 40 def all_todos matches.map { |match| build_todo(diff.path, match) } end |
#todo_matches? ⇒ Boolean
36 37 38 |
# File 'lib/todoist/diff_todo_finder.rb', line 36 def todo_matches? !matches.empty? end |