Sha256: caee38c7644b1068a161151c7c0768c0e9ec77962c59908349c7a7e3a6e3c1bc
Contents?: true
Size: 482 Bytes
Versions: 9
Compression:
Stored size: 482 Bytes
Contents
module Onebox module Engine class GiphyOnebox include Engine include StandardEmbed matches_regexp(/^https?:\/\/(giphy\.com\/gifs|gph\.is)\//) always_https def to_html oembed = get_oembed <<-HTML <a href="#{oembed.url}" target="_blank" class="onebox"> <img src="#{oembed.url}" width="#{oembed.width}" height="#{oembed.height}" #{oembed.title_attr}> </a> HTML end end end end
Version data entries
9 entries across 9 versions & 1 rubygems