Class: Glyptodont::Checkers::Age

Inherits:
Object
  • Object
show all
Defined in:
lib/glyptodont/checkers/age.rb

Overview

Checks that the age of TODOs is below the specified threshold

Instance Method Summary collapse

Constructor Details

#initialize(todos:, threshold:) ⇒ Age

Returns a new instance of Age.



7
8
9
10
# File 'lib/glyptodont/checkers/age.rb', line 7

def initialize(todos:, threshold:)
  @todos = todos
  @threshold = threshold
end

Instance Method Details

#checkObject



12
13
14
# File 'lib/glyptodont/checkers/age.rb', line 12

def check
  message
end

#passed?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/glyptodont/checkers/age.rb', line 16

def passed?
  stale_todos.empty?
end