Sha256: f10cae60661be1ca6c8c35e004d29558131eb4a7c1fbc9bc0e7c08dbe746b471
Contents?: true
Size: 743 Bytes
Versions: 6
Compression:
Stored size: 743 Bytes
Contents
module Onebox module Engine class GoogleDriveOnebox include Engine include StandardEmbed include LayoutSupport matches_regexp /^(https?:)?\/\/(drive\.google\.com)\/file\/d\/(?<key>[\w-]*)\/.+$/ always_https protected def data og_data = get_opengraph title = og_data.title || "Google Drive" title = "#{og_data.title} (video)" if og_data.type =~ /^video[\/\.]/ description = og_data.description || "Google Drive file." result = { link: link, title: title, description: Onebox::Helpers.truncate(description, 250), image: og_data.image } result end end end end
Version data entries
6 entries across 6 versions & 1 rubygems