module EmailMunger

Constants

VERSION

Public Class Methods

encode(str_input) click to toggle source
# File lib/email_munger.rb, line 5
def self.encode(str_input)
  str_output = ''
  str_input.each_char do |c|
    str_c = '&#' + c.ord.to_s + ';'
    str_c = "<i>#{str_c}</i>" if c == '@' || c == '.'
    str_output += str_c
  end
  str_output
end