class Videos::Vimeo

Constants

VIMEO_DEFAULTS

Public Class Methods

new(uri,options={}) click to toggle source
Calls superclass method Videos::Video::new
# File lib/videos/vimeo.rb, line 6
def initialize(uri,options={})
  options = VIMEO_DEFAULTS.merge(options)
  super(uri,options)
end

Public Instance Methods

allowfullscreen() click to toggle source
# File lib/videos/vimeo.rb, line 16
def allowfullscreen
  @options[:allowfullscreen]
end
embed_code() click to toggle source
# File lib/videos/vimeo.rb, line 11
def embed_code
  content_tag(:iframe, '', src: src, width: width, height: height, allowfullscreen: allowfullscreen)
end
Also aliased as: to_html
id() click to toggle source
# File lib/videos/vimeo.rb, line 24
def id
  @uri.to_s.match(/https?:\/\/(?:[\w]+\.)*vimeo\.com(?:[\/\w]*\/?)?\/(?<id>[0-9]+)[^\s]*/)[:id]
end
src() click to toggle source
# File lib/videos/vimeo.rb, line 20
def src
  "https://player.vimeo.com/video/#{id}"
end
to_html()
Alias for: embed_code