class Martlet::Grade
Attributes
letter[R]
Public Class Methods
new(letter)
click to toggle source
# File lib/martlet/grade.rb, line 7 def initialize(letter) @letter = letter.upcase end
Public Instance Methods
<=>(other)
click to toggle source
# File lib/martlet/grade.rb, line 11 def <=>(other) letters.index(letter) <=> letters.index(other.letter) end
Private Instance Methods
letters()
click to toggle source
# File lib/martlet/grade.rb, line 17 def letters %w{P S R CO A A- B+ B B- C+ C D F U HH J K KE K* KF IC KK L LE L* NA && NE NR W WF WL W-- -- IP Q} end