Sha256: 9099b8335f18497d39be898e0e1c16618feed5580a76ac8f45f51ee8f10d6f7d

Contents?: true

Size: 431 Bytes

Versions: 440

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

440 entries across 440 versions & 1 rubygems

Version Path
govuk_publishing_components-24.13.1 lib/govuk_publishing_components/presenters/machine_readable/has_part_schema.rb
govuk_publishing_components-24.13.0 lib/govuk_publishing_components/presenters/machine_readable/has_part_schema.rb
govuk_publishing_components-24.12.0 lib/govuk_publishing_components/presenters/machine_readable/has_part_schema.rb
govuk_publishing_components-24.11.1 lib/govuk_publishing_components/presenters/machine_readable/has_part_schema.rb
govuk_publishing_components-24.11.0 lib/govuk_publishing_components/presenters/machine_readable/has_part_schema.rb
govuk_publishing_components-24.10.3 lib/govuk_publishing_components/presenters/machine_readable/has_part_schema.rb
govuk_publishing_components-24.10.2 lib/govuk_publishing_components/presenters/machine_readable/has_part_schema.rb
govuk_publishing_components-24.10.1 lib/govuk_publishing_components/presenters/machine_readable/has_part_schema.rb
govuk_publishing_components-24.10.0 lib/govuk_publishing_components/presenters/machine_readable/has_part_schema.rb
govuk_publishing_components-24.9.4 lib/govuk_publishing_components/presenters/machine_readable/has_part_schema.rb
govuk_publishing_components-24.9.3 lib/govuk_publishing_components/presenters/machine_readable/has_part_schema.rb
govuk_publishing_components-24.9.2 lib/govuk_publishing_components/presenters/machine_readable/has_part_schema.rb
govuk_publishing_components-24.9.1 lib/govuk_publishing_components/presenters/machine_readable/has_part_schema.rb
govuk_publishing_components-24.9.0 lib/govuk_publishing_components/presenters/machine_readable/has_part_schema.rb
govuk_publishing_components-24.8.0 lib/govuk_publishing_components/presenters/machine_readable/has_part_schema.rb
govuk_publishing_components-24.7.1 lib/govuk_publishing_components/presenters/machine_readable/has_part_schema.rb
govuk_publishing_components-24.7.0 lib/govuk_publishing_components/presenters/machine_readable/has_part_schema.rb
govuk_publishing_components-24.6.1 lib/govuk_publishing_components/presenters/machine_readable/has_part_schema.rb
govuk_publishing_components-24.6.0 lib/govuk_publishing_components/presenters/machine_readable/has_part_schema.rb
govuk_publishing_components-24.5.0 lib/govuk_publishing_components/presenters/machine_readable/has_part_schema.rb