Sha256: d62725cc5aadbb6d0cd787c72687ce19df203da1529a6c6ac9d68ddf72dd8127

Contents?: true

Size: 410 Bytes

Versions: 4

Compression:

Stored size: 410 Bytes

Contents

require "videos/version"
require "videos/uri"
require "videos/video"
require "videos/youtube"
require "videos/youtube"
require "videos/vimeo"

module Videos
  PROVIDERS = {
    'youtube' => Videos::YouTube,
    'vimeo'   => Videos::Vimeo,
    'video'   => Videos::Video
  }

  def self.factory(uri_string,options={})
    uri = Videos::URI.new(uri_string)
    PROVIDERS[uri.provider].new(uri,options)
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rb42-videos-1.0.4 lib/videos.rb
rb42-videos-1.0.3 lib/videos.rb
rb42-videos-1.0.2 lib/videos.rb
rb42-videos-1.0.1 lib/videos.rb