Sha256: 2f59132f5d3a5649399addf9ec41a2f9c5283b77c8087d59dcc2a31754ad7599
Contents?: true
Size: 355 Bytes
Versions: 10
Compression:
Stored size: 355 Bytes
Contents
module Rubycritic class Rating def self.from_cost(cost) if cost <= 2 then new("A") elsif cost <= 4 then new("B") elsif cost <= 8 then new("C") elsif cost <= 16 then new("D") else new("F") end end def initialize(letter) @letter = letter end def to_s @letter end end end
Version data entries
10 entries across 10 versions & 1 rubygems