Class: VideoEmbed::Vimeo

Inherits:
Object
  • Object
show all
Defined in:
lib/video_embed/vimeo.rb

Defined Under Namespace

Classes: Url

Instance Method Summary collapse

Instance Method Details

#embed(url, options = {}) ⇒ Object



7
8
9
10
# File 'lib/video_embed/vimeo.rb', line 7

def embed(url, options = {})
  vimeo_url = Vimeo::Url.new(url, options)
  vimeo_url.embed
end

#url?(url) ⇒ Boolean

Returns:

  • (Boolean)


3
4
5
# File 'lib/video_embed/vimeo.rb', line 3

def url?(url)
  url.host =~ /vimeo.com/
end