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
- #==(o) ⇒ Object
-
#initialize(c) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(c) ⇒ Base
Returns a new instance of Base.
183 184 185 |
# File 'lib/atom.rb', line 183 def initialize(c) __setobj__(c) end |
Instance Method Details
#==(o) ⇒ Object
187 188 189 190 191 192 193 194 195 |
# File 'lib/atom.rb', line 187 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 |