Class: Html2rss::FeedResolution::Diag
- Inherits:
-
Data
- Object
- Data
- Html2rss::FeedResolution::Diag
- Defined in:
- lib/html2rss/feed_resolution/diag.rb
Overview
Wire-safe diagnostics for one entry-resolution attempt (Status / Marshal edge).
Instance Attribute Summary collapse
-
#applied ⇒ Object
readonly
Returns the value of attribute applied.
-
#probe_count ⇒ Object
readonly
Returns the value of attribute probe_count.
-
#reason ⇒ Object
readonly
Returns the value of attribute reason.
-
#winner_score ⇒ Object
readonly
Returns the value of attribute winner_score.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#applied ⇒ Object (readonly)
Returns the value of attribute applied
7 8 9 |
# File 'lib/html2rss/feed_resolution/diag.rb', line 7 def applied @applied end |
#probe_count ⇒ Object (readonly)
Returns the value of attribute probe_count
7 8 9 |
# File 'lib/html2rss/feed_resolution/diag.rb', line 7 def probe_count @probe_count end |
#reason ⇒ Object (readonly)
Returns the value of attribute reason
7 8 9 |
# File 'lib/html2rss/feed_resolution/diag.rb', line 7 def reason @reason end |
#winner_score ⇒ Object (readonly)
Returns the value of attribute winner_score
7 8 9 |
# File 'lib/html2rss/feed_resolution/diag.rb', line 7 def winner_score @winner_score end |
Class Method Details
.from_result(result) ⇒ Diag
11 12 13 14 15 16 17 18 |
# File 'lib/html2rss/feed_resolution/diag.rb', line 11 def self.from_result(result) new( applied: result.applied, probe_count: result.probe_count, reason: result.reason, winner_score: result.winner_score ) end |
Instance Method Details
#to_h ⇒ Hash{Symbol => Object}
22 23 24 25 26 27 28 29 |
# File 'lib/html2rss/feed_resolution/diag.rb', line 22 def to_h { applied:, probe_count:, reason:, **(winner_score.nil? ? {} : { winner_score: }) } end |