Class: GovukPublishingComponents::Presenters::IsPartOfSchema
- Inherits:
-
Object
- Object
- GovukPublishingComponents::Presenters::IsPartOfSchema
- Defined in:
- lib/govuk_publishing_components/presenters/machine_readable/is_part_of_schema.rb
Instance Method Summary collapse
-
#initialize(is_part_of_url) ⇒ IsPartOfSchema
constructor
A new instance of IsPartOfSchema.
- #structured_data ⇒ Object
Constructor Details
#initialize(is_part_of_url) ⇒ IsPartOfSchema
Returns a new instance of IsPartOfSchema.
4 5 6 |
# File 'lib/govuk_publishing_components/presenters/machine_readable/is_part_of_schema.rb', line 4 def initialize(is_part_of_url) @is_part_of_url = is_part_of_url end |
Instance Method Details
#structured_data ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/govuk_publishing_components/presenters/machine_readable/is_part_of_schema.rb', line 8 def structured_data # http://schema.org/isPartOf - minimal { "@context" => "http://schema.org", "@type" => "CreativeWork", "sameAs" => @is_part_of_url, } end |