Class: Syndication::Atom::Link
- Inherits:
-
Container
- Object
- Container
- Syndication::Atom::Link
- Defined in:
- lib/syndication/atom.rb
Overview
A Link represents a hypertext link to another object from an Atom feed. Examples include the link with rel=self to the canonical URL of the feed.
Instance Attribute Summary (collapse)
-
- (Object) href
The URI of the link.
-
- (Object) length
The length of the linked-to object in bytes.
-
- (Object) rel
The type of relationship the link expresses.
-
- (Object) title
The title for the link.
-
- (Object) type
The type of object at the other end of the link.
Instance Method Summary (collapse)
-
- (Link) initialize(parent, tag, attrs = nil)
constructor
A new instance of Link.
Methods inherited from Container
#parse_date, #store, #store_category, #strip, #tag2method, #tag_end, #tag_start
Constructor Details
- (Link) initialize(parent, tag, attrs = nil)
A new instance of Link
204 205 206 207 208 209 210 211 212 |
# File 'lib/syndication/atom.rb', line 204 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) href
The URI of the link.
198 199 200 |
# File 'lib/syndication/atom.rb', line 198 def href @href end |
- (Object) length
The length of the linked-to object in bytes.
202 203 204 |
# File 'lib/syndication/atom.rb', line 202 def length @length end |
- (Object) rel
The type of relationship the link expresses.
199 200 201 |
# File 'lib/syndication/atom.rb', line 199 def rel @rel end |
- (Object) title
The title for the link.
201 202 203 |
# File 'lib/syndication/atom.rb', line 201 def title @title end |
- (Object) type
The type of object at the other end of the link.
200 201 202 |
# File 'lib/syndication/atom.rb', line 200 def type @type end |