class CC::Formatters::SnapshotFormatter::Rating

Simple Comparator for rating letters.

Public Class Methods

new(letter) click to toggle source
# File lib/cc/formatters/snapshot_formatter.rb, line 7
def initialize(letter)
  @letter = letter
end

Public Instance Methods

<=>(other) click to toggle source
# File lib/cc/formatters/snapshot_formatter.rb, line 11
def <=>(other)
  other.to_s <=> to_s
end
eql?(other) click to toggle source
# File lib/cc/formatters/snapshot_formatter.rb, line 19
def eql?(other)
  to_s == other.to_s
end
hash() click to toggle source
# File lib/cc/formatters/snapshot_formatter.rb, line 15
def hash
  @letter.hash
end
inspect() click to toggle source
# File lib/cc/formatters/snapshot_formatter.rb, line 23
def inspect
  "<Rating:#{self}>"
end
to_s() click to toggle source
# File lib/cc/formatters/snapshot_formatter.rb, line 27
def to_s
  @letter.to_s
end