Ruby - Modules and Mixins
What will be the output of this Ruby code?
class Score
include Comparable
attr_reader :points
def initialize(points)
@points = points
end
def <=>(other)
other.points <=> points
end
end
s1 = Score.new(50)
s2 = Score.new(75)
puts s1 > s2