Sha256: 4e1df0cf9f2742ae14280017095200731057dddb031bab52a44bee675b0796f4
Contents?: true
Size: 357 Bytes
Versions: 12
Compression:
Stored size: 357 Bytes
Contents
# frozen_string_literal: true module Values # Users rate their mood class Mood def self.from_rating(rating) if rating < 5 new("Bad") elsif rating == 5 new("Neither") else new("Good") end end def initialize(label) @label = label end def to_s @label.to_s end end end
Version data entries
12 entries across 12 versions & 1 rubygems