Sha256: 128b90399b93d7164a5f07475a00dc08557a13375e0487879f29e859970ed2cd
Contents?: true
Size: 631 Bytes
Versions: 13
Compression:
Stored size: 631 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
13 entries across 13 versions & 1 rubygems