Class: Html2rss::Scoring::RankedSegment

Inherits:
Data
  • Object
show all
Defined in:
lib/html2rss/scoring/ranked_segment.rb

Overview

A segment paired with its composite score.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#scoreObject (readonly)

Returns the value of attribute score

Returns:

  • (Object)

    the current value of score



7
8
9
# File 'lib/html2rss/scoring/ranked_segment.rb', line 7

def score
  @score
end

#segmentObject (readonly)

Returns the value of attribute segment

Returns:

  • (Object)

    the current value of segment



7
8
9
# File 'lib/html2rss/scoring/ranked_segment.rb', line 7

def segment
  @segment
end

Instance Method Details

#final_scoreFloat

Returns:

  • (Float)


18
# File 'lib/html2rss/scoring/ranked_segment.rb', line 18

def final_score = score.composite

#junk_scoreFloat

Returns:

  • (Float)


26
# File 'lib/html2rss/scoring/ranked_segment.rb', line 26

def junk_score = score.junk

#positionInteger

Returns:

  • (Integer)


30
# File 'lib/html2rss/scoring/ranked_segment.rb', line 30

def position = segment.position

Returns:



14
# File 'lib/html2rss/scoring/ranked_segment.rb', line 14

def primary_link = segment.primary_link

#quality_scoreFloat

Returns:

  • (Float)


22
# File 'lib/html2rss/scoring/ranked_segment.rb', line 22

def quality_score = score.quality

#root_nodeSST::Node

Returns:



10
# File 'lib/html2rss/scoring/ranked_segment.rb', line 10

def root_node = segment.root_node