Class: LinkedIn::Recommendations

Inherits:
Base
  • Object
show all
Defined in:
lib/linked_in/recommendations.rb

Defined Under Namespace

Classes: Recommendation

Instance Attribute Summary

Attributes inherited from Base

#doc

Instance Method Summary collapse

Methods inherited from Base

from_xml, #initialize

Constructor Details

This class inherits a constructor from LinkedIn::Base

Instance Method Details

#recommendationsObject



5
6
7
8
9
10
# File 'lib/linked_in/recommendations.rb', line 5

def recommendations
  @recommendations ||= @doc.children.inject([]) do |list, recommendation|
    list << Recommendation.new(recommendation) unless recommendation.blank?
    list
  end
end