class Judges::Options
def to_s
- Example: Convert to string -
Returns:
-
(String)
- Formatted string with each option on a new line
def to_s to_h.map do |k, v| v = v.to_s v = "#{v[0..3]}#{'*' * (v.length - 8)}#{v[-4..]}" if v.length > 8 "#{k} → \"#{v}\"" end.sort.join("\n") end