Sha256: fad6ed8bc96f74d999534dc01a675702c2ceedbe79a613f7219735a5b42d866a

Contents?: true

Size: 223 Bytes

Versions: 7

Compression:

Stored size: 223 Bytes

Contents

# frozen_string_literal: true

module EmailTypo
  # can't do "o.gr" => ".org", as ".gr" is a valid TLD
  TransposedPeriods = lambda do |email|
    email
      .gsub(/c\.om$/, ".com")
      .gsub(/n\.et$/, ".net")
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
email_typo-0.2.3 lib/email_typo/transposed_periods.rb
email_typo-0.2.2 lib/email_typo/transposed_periods.rb
email_typo-0.2.1 lib/email_typo/transposed_periods.rb
email_typo-0.2.0 lib/email_typo/transposed_periods.rb
email_typo-0.1.2 lib/email_typo/transposed_periods.rb
email_typo-0.1.1 lib/email_typo/transposed_periods.rb
email_typo-0.1.0 lib/email_typo/transposed_periods.rb