Sha256: eba60f25e9d871399f7aa2fd2c73287b6743e1bda25d69da7f39ec7b10202e59

Contents?: true

Size: 365 Bytes

Versions: 4

Compression:

Stored size: 365 Bytes

Contents

module Vzaar
  module Resource
    class VideoCollection < Array
      attr_reader :http_status_code

      def initialize(xml_body, status_code)
        @http_status_code = status_code

        doc = Nokogiri::XML(xml_body)
        doc.xpath("//videos/video").each do |xml|
          push(VideoCollectionItem.new(xml.to_s))
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
vzaar-1.2.4 lib/vzaar/resources/video_collection.rb
vzaar-1.2.3 lib/vzaar/resources/video_collection.rb
vzaar-1.2.2 lib/vzaar/resources/video_collection.rb
vzaar-1.0.0 lib/vzaar/resources/video_collection.rb