Class: Syndication::Atom::Category
- Inherits:
-
Container
- Object
- Container
- Syndication::Atom::Category
- Defined in:
- lib/syndication/atom.rb
Overview
A category (keyword) in an Atom feed. For convenience, Category#to_s is the same as Category#label.
Instance Attribute Summary (collapse)
-
- (Object) label
(also: #to_s)
A human-readable version of Category#term.
-
- (Object) scheme
URI to the schema definition.
-
- (Object) term
The category itself, possibly encoded.
Instance Method Summary (collapse)
-
- (Category) initialize(parent, tag, attrs = nil)
constructor
:stopdoc: parent = parent object tag = XML tag which caused creation of this object attrs = XML attributes as a hash.
Methods inherited from Container
#parse_date, #store, #store_category, #strip, #tag2method, #tag_end, #tag_start
Constructor Details
- (Category) initialize(parent, tag, attrs = nil)
:stopdoc: parent = parent object tag = XML tag which caused creation of this object attrs = XML attributes as a hash
285 286 287 288 289 290 291 292 293 |
# File 'lib/syndication/atom.rb', line 285 def initialize(parent, tag, attrs = nil) @tag = tag @parent = parent if attrs attrs.each_pair {|key, value| self.store(key, value) } end end |
Instance Attribute Details
- (Object) label Also known as: to_s
A human-readable version of Category#term.
277 278 279 |
# File 'lib/syndication/atom.rb', line 277 def label @label end |
- (Object) scheme
URI to the schema definition.
279 280 281 |
# File 'lib/syndication/atom.rb', line 279 def scheme @scheme end |
- (Object) term
The category itself, possibly encoded.
275 276 277 |
# File 'lib/syndication/atom.rb', line 275 def term @term end |