class VimeoEmbed
Public Class Methods
new(tagName, content, tokens)
click to toggle source
Calls superclass method
# File lib/jekyll-embeds.rb, line 76 def initialize(tagName, content, tokens) super @content = content end
Public Instance Methods
render(context)
click to toggle source
# File lib/jekyll-embeds.rb, line 81 def render(context) vimeo_url = "#{context[@content.strip]}" if vimeo_url[/vimeo\.com\/([^\?]*)/] @vimeo_id = $1 end %Q{<div class='embed-container'><iframe src="https://player.vimeo.com/video/#{@vimeo_id}" frameborder="0" allowfullscreen="true" scrolling="no" height="390" width="640"></iframe></div>} end