Class: Html2rss::Scoring::RankedSegment
- Inherits:
-
Data
- Object
- Data
- Html2rss::Scoring::RankedSegment
- Defined in:
- lib/html2rss/scoring/ranked_segment.rb
Overview
A segment paired with its composite score.
Instance Attribute Summary collapse
-
#score ⇒ Object
readonly
Returns the value of attribute score.
-
#segment ⇒ Object
readonly
Returns the value of attribute segment.
Instance Method Summary collapse
- #final_score ⇒ Float
- #junk_score ⇒ Float
- #position ⇒ Integer
- #primary_link ⇒ SST::Node?
- #quality_score ⇒ Float
- #root_node ⇒ SST::Node
Instance Attribute Details
#score ⇒ Object (readonly)
Returns the value of attribute score
7 8 9 |
# File 'lib/html2rss/scoring/ranked_segment.rb', line 7 def score @score end |
#segment ⇒ Object (readonly)
Returns the value of attribute segment
7 8 9 |
# File 'lib/html2rss/scoring/ranked_segment.rb', line 7 def segment @segment end |
Instance Method Details
#final_score ⇒ Float
18 |
# File 'lib/html2rss/scoring/ranked_segment.rb', line 18 def final_score = score.composite |
#junk_score ⇒ Float
26 |
# File 'lib/html2rss/scoring/ranked_segment.rb', line 26 def junk_score = score.junk |
#position ⇒ Integer
30 |
# File 'lib/html2rss/scoring/ranked_segment.rb', line 30 def position = segment.position |
#primary_link ⇒ SST::Node?
14 |
# File 'lib/html2rss/scoring/ranked_segment.rb', line 14 def primary_link = segment.primary_link |
#quality_score ⇒ Float
22 |
# File 'lib/html2rss/scoring/ranked_segment.rb', line 22 def quality_score = score.quality |
#root_node ⇒ SST::Node
10 |
# File 'lib/html2rss/scoring/ranked_segment.rb', line 10 def root_node = segment.root_node |