Method: HTML::Pipeline::CamoFilter#hexencode

Defined in:
lib/html/pipeline/camo_filter.rb

#hexencode(str) ⇒ Object

Private: helper to hexencode a string. Each byte ends up encoded into two characters, zero padded value in the range [0-9a-f].



88
89
90
# File 'lib/html/pipeline/camo_filter.rb', line 88

def hexencode(str)
  str.to_enum(:each_byte).map { |byte| "%02x" % byte }.join
end