Class: EM::Redfinger::Link
- Inherits:
-
Hashie::Mash
- Object
- Hashie::Mash
- EM::Redfinger::Link
- Defined in:
- lib/em-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
7 8 9 10 11 12 13 |
# File 'lib/em-redfinger/link.rb', line 7 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.
17 18 19 |
# File 'lib/em-redfinger/link.rb', line 17 def to_s self.href end |