lib/wolf_core/utils/string_utils.rb
module WolfCore module StringUtils def camelcase_to_spaces(str) return if str.nil? str.gsub(/([A-Z])/, ' \1').strip.downcase.capitalize end def clean_phone_number(phone) return if phone.nil? cleaned_phone = phone.gsub(/\D/, '') last_ten_digits = cleaned_phone[-10, 10] last_ten_digits end end end