Class: VgYoutu
- Defined in:
- lib/acts_as_unvlogable/vg_youtu.rb
Instance Method Summary collapse
-
#initialize(url = nil, options = {}) ⇒ VgYoutu
constructor
A new instance of VgYoutu.
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, ={}) url = URI(url) url.host = 'www.youtube.com' url.query = "#{url.query}&v=#{url.path[1..-1]}" url.path = '/watch' super(url.to_s, ) end |