Sha256: 497b222a85557500d6f5268c4ee0ad3bfb99be4c352eb113da8a0f2194a59f14
Contents?: true
Size: 272 Bytes
Versions: 8
Compression:
Stored size: 272 Bytes
Contents
module Onebox module Engine class ImageOnebox include Engine matches_regexp /^(https?:)?\/\/.+\.(png|jpg|jpeg|gif|bmp|tif|tiff)(\?.*)?$/i def to_html "<a href='#{@url}' target='_blank'><img src='#{@url}'></a>" end end end end
Version data entries
8 entries across 8 versions & 1 rubygems