Sha256: 563d110c42167fb736d235c06a3a1416a43d6b73c4937e0759dd8cb4e1590d59
Contents?: true
Size: 629 Bytes
Versions: 16
Compression:
Stored size: 629 Bytes
Contents
module GovukPublishingComponents module Presenters class DatasetSchema attr_reader :page def initialize(page) @page = page end def structured_data # http://schema.org/Dataset data = CreativeWorkSchema.new(@page).structured_data .merge(description) .merge(name) data["@type"] = "Dataset" data end private def description { "description" => (page.body || page.description).slice(0..4999) } end def name { "name" => page.title } end end end end
Version data entries
16 entries across 16 versions & 1 rubygems