class AtomFeed::AtomText

Public Class Methods

new(node) click to toggle source

Initializes the text element.

# File lib/atom_feed/atom_text.rb, line 4
def initialize(node)
  @node = node
end

Public Instance Methods

content()
Alias for: to_s
html?() click to toggle source

Entity escaped HTML

# File lib/atom_feed/atom_text.rb, line 27
def html?
  self.type == "html"
end
text?() click to toggle source

Plain text

# File lib/atom_feed/atom_text.rb, line 22
def text?
  self.type == "text"
end
to_s() click to toggle source

Content of the text

# File lib/atom_feed/atom_text.rb, line 9
def to_s
  @node.content
end
Also aliased as: content
type() click to toggle source

Determines how the information is encoded. Default is “text”

# File lib/atom_feed/atom_text.rb, line 17
def type
  @node["type"] || "text"
end
xhtml?() click to toggle source

Inline XHTML

# File lib/atom_feed/atom_text.rb, line 32
def xhtml?
  self.type == "xhtml"
end