Class: Redfinger::Finger

Inherits:
Object
  • Object
show all
Includes:
LinkHelpers
Defined in:
lib/redfinger/finger.rb

Overview

The result of a Webfinger. For more information about special helpers that are availale to pull specific types of URLs, see Redfinger::LinkHelpers

Instance Method Summary (collapse)

Methods included from LinkHelpers

#hcard, #open_id, #profile_page, #xfn

Constructor Details

- (Finger) initialize(subject, xml)

:nodoc:



8
9
10
11
# File 'lib/redfinger/finger.rb', line 8

def initialize(subject, xml) # :nodoc:
  @doc = Nokogiri::XML::Document.parse(xml)
  @subject = subject
end

Instance Method Details

- (Object) inspect

:nodoc:



18
19
20
# File 'lib/redfinger/finger.rb', line 18

def inspect # :nodoc:
  "<#Redfinger::Finger subject=\"#{@subject}\">"
end

All of the links provided by the Webfinger response.



14
15
16
# File 'lib/redfinger/finger.rb', line 14

def links
  @links ||= @doc.css('Link').map{|l| Link.from_xml(l)}
end