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