Class: Atom::Content::Base
- Inherits:
-
String
- Object
- String
- Atom::Content::Base
- Includes:
- Xml::Parseable
- Defined in:
- lib/atom.rb
Overview
This is the base class for all content within an atom document.
Content can be Text, Html or Xhtml.
A Content object can be treated as a String with type and xml_lang attributes.
For a thorough discussion of atom content see www.atomenabled.org/developers/syndication/atom-format-spec.php#element.content
Instance Method Summary (collapse)
- - (Object) ==(o)
-
- (Base) initialize(c)
constructor
A new instance of Base.
Methods included from Xml::Parseable
#accessor_name, #current_node_is?, included, #next_node_is?, #parse, #to_xml
Methods inherited from String
#constantize, #demodulize, #singularize
Constructor Details
- (Base) initialize(c)
A new instance of Base
195 196 197 |
# File 'lib/atom.rb', line 195 def initialize(c) __setobj__(c) end |
Instance Method Details
- (Object) ==(o)
199 200 201 202 203 204 205 206 207 |
# File 'lib/atom.rb', line 199 def ==(o) if o.is_a?(self.class) self.type == o.type && self.xml_lang == o.xml_lang && self.to_s == o.to_s elsif o.is_a?(String) self.to_s == o end end |