Class: MarkdownVideos::Services::VimeoService

Inherits:
ServiceBase
  • Object
show all
Defined in:
lib/markdown_videos/services/vimeo_service.rb

Instance Attribute Summary

Attributes inherited from ServiceBase

#alt_text, #class_name, #height, #markdown_url, #markdown_url_data, #resource_id, #width, #wrapper

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ServiceBase

#html_attributes, #html_dom_properties, #initialize, #render, #service_url, support, #to_html, #url_parameters

Constructor Details

This class inherits a constructor from MarkdownVideos::Services::ServiceBase

Class Method Details

.regexpObject



5
6
7
# File 'lib/markdown_videos/services/vimeo_service.rb', line 5

def self.regexp
  /^(https?:\/\/(?:(?:player\.)?vimeo.com\/(?:video\/)?)([0-9]{4,16})\??([\w\-\=]+)?)$/
end

Instance Method Details

#urlObject



9
10
11
# File 'lib/markdown_videos/services/vimeo_service.rb', line 9

def url
  "https://player.vimeo.com/video/#{resource_id}"
end