Class: Atom::Generator
Overview
Represents a Generator as defined by the Atom Syndication Format specification.
The generator identifies an agent or engine used to a produce a feed.
See also www.atomenabled.org/developers/syndication/atom-format-spec.php#element.generator
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(o = nil) {|_self| ... } ⇒ Generator
constructor
Initialize a new Generator.
Constructor Details
#initialize(o = nil) {|_self| ... } ⇒ Generator
Initialize a new Generator.
xml
-
An XML::Reader object.
92 93 94 95 96 97 98 99 100 101 102 103 104 |
# File 'lib/atom.rb', line 92 def initialize(o = nil) case o when XML::Reader @name = o.read_string.strip 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 |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
85 86 87 |
# File 'lib/atom.rb', line 85 def name @name end |