Class: Atom::Content
- Inherits:
-
Object
show all
- Defined in:
- lib/atom.rb
Overview
Defined Under Namespace
Classes: Base, External, Html, Text, Xhtml
Constant Summary
collapse
- PARSERS =
{'html' => Html, 'xhtml' => Xhtml}
Class Method Summary
collapse
Class Method Details
.parse(xml) ⇒ Object
174
175
176
177
178
179
180
181
|
# File 'lib/atom.rb', line 174
def self.parse(xml)
if xml.attributes['src'] && !xml.attributes['src'].empty?
External.new(xml)
else
parser = PARSERS[xml.attributes['type']] || Text
parser.new(xml)
end
end
|