Sha256: 78981587ca4411d10febc7828e68d052fbaff012dcd8b6dbe1f05ab1073f2080
Contents?: true
Size: 537 Bytes
Versions: 13
Compression:
Stored size: 537 Bytes
Contents
class String def c(*codes) "\e[#{codes.join;}m#{self}\e[0m" end def u gsub(/&(lt|gt|amp|quot|apos);/) do |s| case s when '&' then '&' when '<' then '<' when '>' then '>' when ''' then "'" when '"' then '"' end end end def e gsub(/[&<>'"]/) do |s| case s when '&' then '&' when '<' then '<' when '>' then '>' when "'" then ''' when '"' then '"' end end end end
Version data entries
13 entries across 13 versions & 1 rubygems