Class: Textus::Domain::Freshness::Verdict
- Inherits:
-
Data
- Object
- Data
- Textus::Domain::Freshness::Verdict
- Defined in:
- lib/textus/domain/freshness/verdict.rb
Instance Attribute Summary collapse
-
#fresh ⇒ Object
readonly
Returns the value of attribute fresh.
-
#reason ⇒ Object
readonly
Returns the value of attribute reason.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#fresh ⇒ Object (readonly)
Returns the value of attribute fresh
4 5 6 |
# File 'lib/textus/domain/freshness/verdict.rb', line 4 def fresh @fresh end |
#reason ⇒ Object (readonly)
Returns the value of attribute reason
4 5 6 |
# File 'lib/textus/domain/freshness/verdict.rb', line 4 def reason @reason end |
Class Method Details
.fresh ⇒ Object
5 |
# File 'lib/textus/domain/freshness/verdict.rb', line 5 def self.fresh = new(fresh: true, reason: nil) |
.stale(reason) ⇒ Object
6 |
# File 'lib/textus/domain/freshness/verdict.rb', line 6 def self.stale(reason) = new(fresh: false, reason: reason) |
Instance Method Details
#fresh? ⇒ Boolean
7 |
# File 'lib/textus/domain/freshness/verdict.rb', line 7 def fresh? = fresh |
#stale? ⇒ Boolean
8 |
# File 'lib/textus/domain/freshness/verdict.rb', line 8 def stale? = !fresh |