Sha256: 7e9eb7ad9700964886d0ab3917f551b45f74ca7a576bc61dc6bf6333b39c5ff6
Contents?: true
Size: 439 Bytes
Versions: 12
Compression:
Stored size: 439 Bytes
Contents
# frozen_string_literal: true module Values # Participants rate their emotion with an intensity class EmotionalRating def self.from_rating(rating) return "Not answered" if rating.nil? 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