Module: SchemaOrg::Mixins::ProductModel

Includes:
Product
Included in:
ProductModel
Defined in:
lib/schema_org/mixins/product_model.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Product

#additional_property, #additional_property=, #aggregate_rating, #aggregate_rating=, #asin, #asin=, #audience, #audience=, #award, #award=, #awards, #awards=, #brand, #brand=, #category, #category=, #color, #color=, #color_swatch, #color_swatch=, #country_of_assembly, #country_of_assembly=, #country_of_last_processing, #country_of_last_processing=, #country_of_origin, #country_of_origin=, #depth, #depth=, #display_location, #display_location=, #funding, #funding=, #gtin, #gtin12, #gtin12=, #gtin13, #gtin13=, #gtin14, #gtin14=, #gtin8, #gtin8=, #gtin=, #has_adult_consideration, #has_adult_consideration=, #has_certification, #has_certification=, #has_energy_consumption_details, #has_energy_consumption_details=, #has_gs1_digital_link, #has_gs1_digital_link=, #has_measurement, #has_measurement=, #has_merchant_return_policy, #has_merchant_return_policy=, #has_product_return_policy, #has_product_return_policy=, #height, #height=, #in_product_group_with_id, #in_product_group_with_id=, #is_accessory_or_spare_part_for, #is_accessory_or_spare_part_for=, #is_consumable_for, #is_consumable_for=, #is_family_friendly, #is_family_friendly=, #is_related_to, #is_related_to=, #is_similar_to, #is_similar_to=, #item_condition, #item_condition=, #keywords, #keywords=, #logo, #logo=, #manufacturer, #manufacturer=, #material, #material=, #mobile_url, #mobile_url=, #model, #model=, #mpn, #mpn=, #negative_notes, #negative_notes=, #nsn, #nsn=, #offers, #offers=, #pattern, #pattern=, #positive_notes, #positive_notes=, #product_id, #product_id=, #production_date, #production_date=, #purchase_date, #purchase_date=, #release_date, #release_date=, #review, #review=, #reviews, #reviews=, #size, #size=, #sku, #sku=, #slogan, #slogan=, #weight, #weight=, #width, #width=

Methods included from Thing

#additional_type, #additional_type=, #alternate_name, #alternate_name=, #description, #description=, #disambiguating_description, #disambiguating_description=, #identifier, #identifier=, #image, #image=, #main_entity_of_page, #main_entity_of_page=, #name, #name=, #owner, #owner=, #potential_action, #potential_action=, #same_as, #same_as=, #subject_of, #subject_of=, #url, #url=

Class Method Details

.schema_property_definitionsObject



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/schema_org/mixins/product_model.rb', line 11

def self.schema_property_definitions
  {
    is_variant_of: {
      schema_name: "isVariantOf",
      schema_url: "https://schema.org/isVariantOf",
      comment_lines: ["Indicates the kind of product that this is a variant of. In the case of [[ProductModel]], this is a pointer (from a ProductModel) to a base product from which this product is a variant. It is safe to infer that the variant inherits all product features from the base model, unless defined locally. This is not transitive. In the case of a [[ProductGroup]], the group description also serves as a template, representing a set of Products that vary on explicitly defined, specific dimensions only (so it defines both a set of variants, as well as which values distinguish amongst those variants). When used with [[ProductGroup]], this property can apply to any [[Product]] included in the group."].freeze,
      ranges: ["ProductGroup", "ProductModel"].freeze,
      external_ranges: [].freeze,
      inverse_of: "hasVariant",
      superseded_by: nil,
      supersedes: nil
    }.freeze,
    predecessor_of: {
      schema_name: "predecessorOf",
      schema_url: "https://schema.org/predecessorOf",
      comment_lines: ["A pointer from a previous, often discontinued variant of the product to its newer variant."].freeze,
      ranges: ["ProductModel"].freeze,
      external_ranges: [].freeze,
      inverse_of: nil,
      superseded_by: nil,
      supersedes: nil
    }.freeze,
    successor_of: {
      schema_name: "successorOf",
      schema_url: "https://schema.org/successorOf",
      comment_lines: ["A pointer from a newer variant of a product  to its previous, often discontinued predecessor."].freeze,
      ranges: ["ProductModel"].freeze,
      external_ranges: [].freeze,
      inverse_of: nil,
      superseded_by: nil,
      supersedes: nil
    }.freeze
  }.freeze
end

Instance Method Details

#is_variant_ofObject

Indicates the kind of product that this is a variant of. In the case of [[ProductModel]], this is a pointer (from a ProductModel) to a base product from which this product is a variant. It is safe to infer that the variant inherits all product features from the base model, unless defined locally. This is not transitive. In the case of a [[ProductGroup]], the group description also serves as a template, representing a set of Products that vary on explicitly defined, specific dimensions only (so it defines both a set of variants, as well as which values distinguish amongst those variants). When used with [[ProductGroup]], this property can apply to any [[Product]] included in the group. Inverse-property: hasVariant.



48
49
50
# File 'lib/schema_org/mixins/product_model.rb', line 48

def is_variant_of
  read_property(:is_variant_of)
end

#is_variant_of=(value) ⇒ Object

Indicates the kind of product that this is a variant of. In the case of [[ProductModel]], this is a pointer (from a ProductModel) to a base product from which this product is a variant. It is safe to infer that the variant inherits all product features from the base model, unless defined locally. This is not transitive. In the case of a [[ProductGroup]], the group description also serves as a template, representing a set of Products that vary on explicitly defined, specific dimensions only (so it defines both a set of variants, as well as which values distinguish amongst those variants). When used with [[ProductGroup]], this property can apply to any [[Product]] included in the group. Inverse-property: hasVariant.



54
55
56
# File 'lib/schema_org/mixins/product_model.rb', line 54

def is_variant_of=(value)
  write_property(:is_variant_of, value)
end

#predecessor_ofObject

A pointer from a previous, often discontinued variant of the product to its newer variant.



59
60
61
# File 'lib/schema_org/mixins/product_model.rb', line 59

def predecessor_of
  read_property(:predecessor_of)
end

#predecessor_of=(value) ⇒ Object

A pointer from a previous, often discontinued variant of the product to its newer variant.



64
65
66
# File 'lib/schema_org/mixins/product_model.rb', line 64

def predecessor_of=(value)
  write_property(:predecessor_of, value)
end

#successor_ofObject

A pointer from a newer variant of a product to its previous, often discontinued predecessor.



69
70
71
# File 'lib/schema_org/mixins/product_model.rb', line 69

def successor_of
  read_property(:successor_of)
end

#successor_of=(value) ⇒ Object

A pointer from a newer variant of a product to its previous, often discontinued predecessor.



74
75
76
# File 'lib/schema_org/mixins/product_model.rb', line 74

def successor_of=(value)
  write_property(:successor_of, value)
end