Class: Thumbnailer::Dailymotion
- Defined in:
- lib/thumbnailer/sites/dailymotion.rb
Instance Attribute Summary
Attributes inherited from Base
#embed_url, #small_thumb_image, #thumb_image
Instance Method Summary collapse
-
#initialize(uri) ⇒ Dailymotion
constructor
A new instance of Dailymotion.
Constructor Details
#initialize(uri) ⇒ Dailymotion
Returns a new instance of Dailymotion.
3 4 5 6 7 8 |
# File 'lib/thumbnailer/sites/dailymotion.rb', line 3 def initialize(uri) video_id = uri.path.split('video/')[1] @embed_url = "http://www.dailymotion.com/swf/video/#{video_id}" @thumb_image = "http://www.dailymotion.com/thumbnail/313x240/video/#{video_id}" @small_thumb_image = "http://www.dailymotion.com/thumbnail/160x120/video/#{video_id}" end |