Module: EmailMunger

Defined in:
lib/email_munger.rb,
lib/email_munger/version.rb

Constant Summary collapse

VERSION =
'0.0.0'

Class Method Summary collapse

Class Method Details

.encode(str_input) ⇒ Object



5
6
7
8
9
10
11
12
13
# 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