class EmbedRb::Flickr
Public Class Methods
new(input, output, options, embeds)
click to toggle source
# File lib/embedrb/image/embed_flickr.rb, line 8 def initialize(input, output, options, embeds) @input = input @output = output @embeds = embeds @options = options @regex = /(flickr.com\/[a-z]+\/[a-zA-Z0-9@_\-]+\/[\d]+)/mi @service = :flickr end
Private Instance Methods
render(url)
click to toggle source
# File lib/embedrb/image/embed_flickr.rb, line 18 def render(url) dims = EmbedRb.get_dimensions(@options) return <<EOF <div class="ejs-embed"> <div class="ne-image-wrapper"> <iframe src="#{EmbedRb.to_url(url.split('/?')[0])}/player/" width="#{dims[:width]}" height="#{dims[:height]}" ></iframe> </div> </div> EOF end