Class: UnvlogIt
Defined Under Namespace
Classes: VideoFactory
Instance Method Summary collapse
-
#download_url ⇒ Object
Deprecated.
-
#duration ⇒ Object
duration is in seconds.
- #embed_html(width = 425, height = 344, options = {}, params = {}) ⇒ Object
- #embed_url ⇒ Object
-
#flv ⇒ Object
Deprecated.
-
#initialize(url = nil, options = {}) ⇒ UnvlogIt
constructor
A new instance of UnvlogIt.
- #service ⇒ Object
- #thumbnail ⇒ Object
- #title ⇒ Object
- #video_details(width = 425, height = 344) ⇒ Object
- #video_id ⇒ Object
Constructor Details
#initialize(url = nil, options = {}) ⇒ UnvlogIt
Returns a new instance of UnvlogIt.
27 28 29 |
# File 'lib/acts_as_unvlogable.rb', line 27 def initialize(url=nil, ={}) @object = VideoFactory.new(url, ).load_service end |
Instance Method Details
#download_url ⇒ Object
Deprecated
64 65 |
# File 'lib/acts_as_unvlogable.rb', line 64 def download_url end |
#duration ⇒ Object
duration is in seconds
39 40 41 |
# File 'lib/acts_as_unvlogable.rb', line 39 def duration # duration is in seconds @object.duration rescue nil end |
#embed_html(width = 425, height = 344, options = {}, params = {}) ⇒ Object
51 52 53 |
# File 'lib/acts_as_unvlogable.rb', line 51 def (width=425, height=344, ={}, params={}) @object.(width, height, , params) rescue nil end |
#embed_url ⇒ Object
43 44 45 |
# File 'lib/acts_as_unvlogable.rb', line 43 def @object. rescue nil end |
#service ⇒ Object
55 56 57 |
# File 'lib/acts_as_unvlogable.rb', line 55 def service @object.service rescue nil end |
#thumbnail ⇒ Object
35 36 37 |
# File 'lib/acts_as_unvlogable.rb', line 35 def thumbnail @object.thumbnail rescue nil end |
#title ⇒ Object
31 32 33 |
# File 'lib/acts_as_unvlogable.rb', line 31 def title @object.title rescue nil end |
#video_details(width = 425, height = 344) ⇒ Object
67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/acts_as_unvlogable.rb', line 67 def video_details(width=425, height=344) { :title => @object.title, :thumbnail => @object.thumbnail, :embed_url => @object., :embed_html => @object.(width, height), :flv => nil, # Deprecated :download_url => nil, # Deprecated :service => @object.service, :duration => @object.duration } end |
#video_id ⇒ Object
47 48 49 |
# File 'lib/acts_as_unvlogable.rb', line 47 def video_id @object.video_id rescue nil end |