Sha256: ce4b82c457d0abc04794419279ed73ea80e090b47b99f6ca4197e43720ecce65
Contents?: true
Size: 426 Bytes
Versions: 2
Compression:
Stored size: 426 Bytes
Contents
module Onebox module Engine class GiphyOnebox include Engine include StandardEmbed matches_regexp(/^https?:\/\/giphy\.com\/gifs\//) def to_html oembed = get_oembed <<-HTML <a href="#{oembed[:url]}" target="_blank"> <img src="#{oembed[:image]}" width="#{oembed[:width]}" height="#{oembed[:height]}"> </a> HTML end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
onebox-1.5.64 | lib/onebox/engine/giphy_onebox.rb |
onebox-1.5.63 | lib/onebox/engine/giphy_onebox.rb |