Class: Syndication::RSS::Enclosure
- Inherits:
-
Container
- Object
- Container
- Syndication::RSS::Enclosure
- Defined in:
- lib/syndication/rss.rb
Overview
Represents a multimedia enclosure in an RSS item. Typically found as Syndication::Item#enclosure
Instance Attribute Summary (collapse)
-
- (Object) length
The length of the file, in bytes.
-
- (Object) type
The MIME type of the file.
-
- (Object) url
The URL to the multimedia file.
Instance Method Summary (collapse)
-
- (Enclosure) initialize(parent, tag, attrs = nil)
constructor
A new instance of Enclosure.
Methods inherited from Container
#parse_date, #store, #store_category, #strip, #tag2method, #tag_end, #tag_start
Constructor Details
- (Enclosure) initialize(parent, tag, attrs = nil)
A new instance of Enclosure
257 258 259 260 261 262 263 264 265 |
# File 'lib/syndication/rss.rb', line 257 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) length
The length of the file, in bytes.
250 251 252 |
# File 'lib/syndication/rss.rb', line 250 def length @length end |
- (Object) type
The MIME type of the file.
248 249 250 |
# File 'lib/syndication/rss.rb', line 248 def type @type end |
- (Object) url
The URL to the multimedia file.
246 247 248 |
# File 'lib/syndication/rss.rb', line 246 def url @url end |