class Onebox::Engine::GoogleDriveOnebox

Protected Instance Methods

data() click to toggle source
# File lib/onebox/engine/google_drive_onebox.rb, line 15
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."

  {
    link: link,
    title: title,
    description: Onebox::Helpers.truncate(description, 250),
    image: og_data.image
  }
end