Class: Atom::Category
- Inherits:
-
Object
- Object
- Atom::Category
- Includes:
- SimpleExtensions, Xml::Parseable
- Defined in:
- lib/atom.rb
Overview
Represents a Category as defined by the Atom Syndication Format specification.
Instance Attribute Summary
Attributes included from SimpleExtensions
Instance Method Summary collapse
-
#initialize(o = nil) {|_self| ... } ⇒ Category
constructor
A new instance of Category.
Methods included from SimpleExtensions
Constructor Details
#initialize(o = nil) {|_self| ... } ⇒ Category
Returns a new instance of Category.
115 116 117 118 119 120 121 122 123 124 125 126 |
# File 'lib/atom.rb', line 115 def initialize(o = nil) case o when XML::Reader parse(o, :once => true) when Hash o.each do |k, v| self.send("#{k.to_s}=", v) end end yield(self) if block_given? end |