Class: Siding::Staleness::Verdict
- Inherits:
-
Struct
- Object
- Struct
- Siding::Staleness::Verdict
- Defined in:
- lib/siding/staleness.rb
Instance Attribute Summary collapse
-
#reasons ⇒ Object
Returns the value of attribute reasons.
-
#revision_label ⇒ Object
Returns the value of attribute revision_label.
-
#strategy ⇒ Object
Returns the value of attribute strategy.
-
#trigger_paths ⇒ Object
Returns the value of attribute trigger_paths.
Instance Method Summary collapse
- #fresh? ⇒ Boolean
- #reboot? ⇒ Boolean
- #reloadable? ⇒ Boolean
- #resolution ⇒ Object
- #stale? ⇒ Boolean
- #summary ⇒ Object
Instance Attribute Details
#reasons ⇒ Object
Returns the value of attribute reasons
21 22 23 |
# File 'lib/siding/staleness.rb', line 21 def reasons @reasons end |
#revision_label ⇒ Object
Returns the value of attribute revision_label
21 22 23 |
# File 'lib/siding/staleness.rb', line 21 def revision_label @revision_label end |
#strategy ⇒ Object
Returns the value of attribute strategy
21 22 23 |
# File 'lib/siding/staleness.rb', line 21 def strategy @strategy end |
#trigger_paths ⇒ Object
Returns the value of attribute trigger_paths
21 22 23 |
# File 'lib/siding/staleness.rb', line 21 def trigger_paths @trigger_paths end |
Instance Method Details
#reloadable? ⇒ Boolean
24 |
# File 'lib/siding/staleness.rb', line 24 def reloadable? = strategy == RELOADABLE |
#resolution ⇒ Object
27 28 29 30 31 32 33 |
# File 'lib/siding/staleness.rb', line 27 def resolution case strategy when FRESH then "fresh" when RELOADABLE then "reloaded_in_worker" else "rebuild" end end |
#stale? ⇒ Boolean
23 |
# File 'lib/siding/staleness.rb', line 23 def stale? = !fresh? |
#summary ⇒ Object
35 36 37 38 39 40 41 |
# File 'lib/siding/staleness.rb', line 35 def summary return "up to date" if fresh? detail = trigger_paths.first reason = reasons.first detail ? "#{reason}: #{File.basename(detail)}" : reason.to_s end |