Sha256: 5b3aeb7cbfe42ef20c5e50c4ae47e978fefa62161b29f90f78ba85e2b240f993
Contents?: true
Size: 364 Bytes
Versions: 16
Compression:
Stored size: 364 Bytes
Contents
# frozen_string_literal: true module Truemail module Dns PunycodeRepresenter = Class.new do require 'simpleidn' def self.call(email) return unless email.is_a?(::String) return email if email.ascii_only? user, domain = email.split('@') "#{user}@#{SimpleIDN.to_ascii(domain.downcase)}" end end end end
Version data entries
16 entries across 16 versions & 1 rubygems