Sha256: 9099b8335f18497d39be898e0e1c16618feed5580a76ac8f45f51ee8f10d6f7d

Contents?: true

Size: 431 Bytes

Versions: 422

Compression:

Stored size: 431 Bytes

Contents

module GovukPublishingComponents
  module Presenters
    class HasPartSchema
      attr_reader :has_part_url

      def initialize(has_part_url)
        @has_part_url = has_part_url
      end

      def structured_data
        # http://schema.org/hasPart - minimal
        {
          "@context" => "http://schema.org",
          "@type" => "CreativeWork",
          "sameAs" => has_part_url,
        }
      end
    end
  end
end

Version data entries

422 entries across 422 versions & 1 rubygems

Version Path
govuk_publishing_components-23.2.1 lib/govuk_publishing_components/presenters/machine_readable/has_part_schema.rb
govuk_publishing_components-23.2.0 lib/govuk_publishing_components/presenters/machine_readable/has_part_schema.rb
govuk_publishing_components-23.1.0 lib/govuk_publishing_components/presenters/machine_readable/has_part_schema.rb
govuk_publishing_components-23.0.0 lib/govuk_publishing_components/presenters/machine_readable/has_part_schema.rb
govuk_publishing_components-21.69.0 lib/govuk_publishing_components/presenters/machine_readable/has_part_schema.rb
govuk_publishing_components-21.68.1 lib/govuk_publishing_components/presenters/machine_readable/has_part_schema.rb
govuk_publishing_components-21.68.0 lib/govuk_publishing_components/presenters/machine_readable/has_part_schema.rb
govuk_publishing_components-21.67.2 lib/govuk_publishing_components/presenters/machine_readable/has_part_schema.rb
govuk_publishing_components-21.67.1 lib/govuk_publishing_components/presenters/machine_readable/has_part_schema.rb
govuk_publishing_components-21.67.0 lib/govuk_publishing_components/presenters/machine_readable/has_part_schema.rb
govuk_publishing_components-21.66.4 lib/govuk_publishing_components/presenters/machine_readable/has_part_schema.rb
govuk_publishing_components-21.66.3 lib/govuk_publishing_components/presenters/machine_readable/has_part_schema.rb
govuk_publishing_components-21.66.2 lib/govuk_publishing_components/presenters/machine_readable/has_part_schema.rb
govuk_publishing_components-21.66.1 lib/govuk_publishing_components/presenters/machine_readable/has_part_schema.rb
govuk_publishing_components-21.66.0 lib/govuk_publishing_components/presenters/machine_readable/has_part_schema.rb
govuk_publishing_components-21.65.1 lib/govuk_publishing_components/presenters/machine_readable/has_part_schema.rb
govuk_publishing_components-21.65.0 lib/govuk_publishing_components/presenters/machine_readable/has_part_schema.rb
govuk_publishing_components-21.64.0 lib/govuk_publishing_components/presenters/machine_readable/has_part_schema.rb
govuk_publishing_components-21.63.3 lib/govuk_publishing_components/presenters/machine_readable/has_part_schema.rb
govuk_publishing_components-21.63.2 lib/govuk_publishing_components/presenters/machine_readable/has_part_schema.rb