# frozen_string_literal: true require 'colorized_string' module Helium class Console class ColorizedString < ColorizedString def length uncolorize.to_s.length end def colorize(*) return self unless Pry.color super end module Helpers ColorizedString.colors.each do |color| define_method(color) do |string| ColorizedString.new(string).colorize(color) end end def length_of(string) ColorizedString.new(string).length end end end end end