Class: Glyptodont::Checkers::Counter
- Inherits:
-
Object
- Object
- Glyptodont::Checkers::Counter
- Defined in:
- lib/glyptodont/checkers/counter.rb
Overview
Checks that the number of TODOs is below the specified threshold
Instance Method Summary collapse
- #check ⇒ Object
-
#initialize(todos:, threshold:) ⇒ Counter
constructor
A new instance of Counter.
- #passed? ⇒ Boolean
Constructor Details
#initialize(todos:, threshold:) ⇒ Counter
Returns a new instance of Counter.
7 8 9 10 |
# File 'lib/glyptodont/checkers/counter.rb', line 7 def initialize(todos:, threshold:) @threshold = threshold @todos = todos end |
Instance Method Details
#check ⇒ Object
12 13 14 |
# File 'lib/glyptodont/checkers/counter.rb', line 12 def check end |
#passed? ⇒ Boolean
16 17 18 |
# File 'lib/glyptodont/checkers/counter.rb', line 16 def passed? count <= threshold end |