Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/extension_methods.rb

Overview

String

Instance Method Summary collapse

Instance Method Details

#to_xObject


15
16
17
18
19
20
21
# File 'lib/extension_methods.rb', line 15

def to_x 
  text = self
  text = text.gsub("&","&")
  text = text.gsub("<","&lt;")
  text = text.gsub(">","&gt;")
  return text
end