Class: Postablr::Entry::Video

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/postablr/entry/video.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#urlObject

Returns the value of attribute url.



9
10
11
# File 'app/models/postablr/entry/video.rb', line 9

def url
  @url
end

Instance Method Details

#check_videoObject



12
13
14
15
16
17
18
19
20
21
# File 'app/models/postablr/entry/video.rb', line 12

def check_video
  v = UnvlogIt.new(self.url)
  self.title = v.title
  self.thumbnail = v.thumbnail
  self.embed_url = v.embed_url
  self.duration  = v.duration
  self.download_url = v.download_url
  self.embed_html = v.embed_html("100%", "600")
  self.flv = v.flv
end

#embed(width, height, options = {}) ⇒ Object



23
24
25
# File 'app/models/postablr/entry/video.rb', line 23

def embed(width, height, options={})
  embed_html(width=425, height=344, options={})
end