class String
Public Instance Methods
unxml()
click to toggle source
# File lib/etblog.rb, line 18 def unxml inside_tag = false out = '' self.split('').each do |item| if item == '<' then inside_tag = true elsif item == '>' then inside_tag = false elsif inside_tag == false then out += item end end return out end