Method: Atom::Text#html

Defined in:
lib/atom/text.rb

#htmlObject

returns a string suitable for dumping into an HTML document.

(or nil if that's impossible)

if you’re storing the content of a Text construct, you probably want this representation.



93
94
95
96
97
98
99
# File 'lib/atom/text.rb', line 93

def html
  if self["type"] == "xhtml" or self["type"] == "html"
    to_s
  elsif self["type"] == "text"
    REXML::Text.new(to_s).to_s
  end
end