Class: VgYoutu

Inherits:
VgYoutube show all
Defined in:
lib/acts_as_unvlogable/vg_youtu.rb

Instance Method Summary collapse

Methods inherited from VgYoutube

#duration, #embed_html, #embed_url, #service, #thumbnail, #title

Constructor Details

#initialize(url = nil, options = {}) ⇒ VgYoutu

Returns a new instance of VgYoutu.



4
5
6
7
8
9
10
# File 'lib/acts_as_unvlogable/vg_youtu.rb', line 4

def initialize(url=nil, options={})
  url = URI(url)
  url.host = 'www.youtube.com'
  url.query = "#{url.query}&v=#{url.path[1..-1]}"
  url.path = '/watch'
  super(url.to_s, options)
end