class HostedVideo::Providers::YoutubeByIframe
Public Class Methods
can_parse?(url)
click to toggle source
# File lib/hosted_video/providers/youtube_by_iframe.rb, line 5 def self.can_parse?(url) url =~ /youtube\.com\/embed\/[\w,-]{11}(\?.*)?/ end
Private Instance Methods
vid_regex()
click to toggle source
# File lib/hosted_video/providers/youtube_by_iframe.rb, line 11 def vid_regex /youtube\.com\/embed\/(?<id>[\w,-]{11})(\?.*)?/ end