Class: Cease::Examiner
- Inherits:
-
Object
- Object
- Cease::Examiner
- Defined in:
- lib/cease/examiner.rb
Instance Attribute Summary collapse
-
#source ⇒ Object
readonly
Returns the value of attribute source.
Instance Method Summary collapse
- #evictions ⇒ Object
-
#initialize(source:) ⇒ Examiner
constructor
A new instance of Examiner.
- #overdue_evictions ⇒ Object
- #summarizable? ⇒ Boolean
- #summarize ⇒ Object
Constructor Details
#initialize(source:) ⇒ Examiner
Returns a new instance of Examiner.
7 8 9 |
# File 'lib/cease/examiner.rb', line 7 def initialize(source:) @source = source end |
Instance Attribute Details
#source ⇒ Object (readonly)
Returns the value of attribute source.
28 29 30 |
# File 'lib/cease/examiner.rb', line 28 def source @source end |
Instance Method Details
#evictions ⇒ Object
11 12 13 |
# File 'lib/cease/examiner.rb', line 11 def evictions @evictions ||= Eviction::Context.from_source(source: source) end |
#overdue_evictions ⇒ Object
24 25 26 |
# File 'lib/cease/examiner.rb', line 24 def overdue_evictions evictions.select(&:overdue?) end |
#summarizable? ⇒ Boolean
20 21 22 |
# File 'lib/cease/examiner.rb', line 20 def summarizable? overdue_evictions.any? end |