class Aperitifilm::RankingPosition
Attributes
item[R]
score[R]
Public Class Methods
new(item, score)
click to toggle source
# File lib/aperitifilm/ranking_position.rb, line 7 def initialize(item, score) @item = item @score = Float(score) end
Public Instance Methods
<=>(other_position)
click to toggle source
# File lib/aperitifilm/ranking_position.rb, line 12 def <=>(other_position) (self.score <=> other_position.score) * -1 end