Class: Redfinger::Link
- Inherits:
-
Hashie::Mash
- Object
- Hashie::Mash
- Redfinger::Link
- Defined in:
- lib/redfinger/link.rb
Instance Method Summary collapse
-
#initialize(xml_link) ⇒ Link
constructor
A new instance of Link.
-
#to_s ⇒ Object
Outputs the URL of the link, useful for using a Link directly in other libraries.
Constructor Details
#initialize(xml_link) ⇒ Link
Returns a new instance of Link.
6 7 8 9 10 |
# File 'lib/redfinger/link.rb', line 6 def initialize(xml_link) self[:rel] = xml_link['rel'] self[:href] = xml_link['href'] self[:type] = xml_link['type'] end |
Instance Method Details
#to_s ⇒ Object
Outputs the URL of the link, useful for using a Link directly in other libraries.
14 15 16 |
# File 'lib/redfinger/link.rb', line 14 def to_s self.href end |