Sha256: f4dae93cec52c76ecece97245b9b07b71b09c697af560d4da8beb9cc3c721882

Contents?: true

Size: 612 Bytes

Versions: 5

Compression:

Stored size: 612 Bytes

Contents

module LinkedIn
  class Group  < LinkedIn::Base

    def groups
      @array ||= begin
        @array = []
        @doc.children.each do |group|
          @array << Resource.new(group) unless group.blank?
        end
        @array
      end
    end

    class Resource

      def initialize(group)
        @group = group
      end

      def id
        @group.xpath('//member-group/id').text.to_i
      end

      def name
        @group.xpath('//member-group/name').text
      end

      def url
        @group.xpath('//member-group/site-group-request/url').text
      end

    end # resource class

  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
linkedin-idkmybffjill-0.2.3 lib/linked_in/group.rb
linkedin-idkmybffjill-0.2.2 lib/linked_in/group.rb
linkedin-idkmybffjill-0.2.1 lib/linked_in/group.rb
linkedin-idkmybffjill-0.2.0 lib/linked_in/group.rb
linkedin-idkmybffjill-0.1.9 lib/linked_in/group.rb