Module: SchemaOrg::Mixins::ProductGroup

Includes:
Product
Included in:
ProductGroup
Defined in:
lib/schema_org/mixins/product_group.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=, #is_variant_of, #is_variant_of=, #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_group.rb', line 11

def self.schema_property_definitions
  {
    has_variant: {
      schema_name: "hasVariant",
      schema_url: "https://schema.org/hasVariant",
      comment_lines: ["Indicates a [[Product]] that is a member of this [[ProductGroup]] (or [[ProductModel]])."].freeze,
      ranges: ["Product"].freeze,
      external_ranges: [].freeze,
      inverse_of: "isVariantOf",
      superseded_by: nil,
      supersedes: nil
    }.freeze,
    product_group_id: {
      schema_name: "productGroupID",
      schema_url: "https://schema.org/productGroupID",
      comment_lines: ["Indicates a textual identifier for a ProductGroup."].freeze,
      ranges: ["Text"].freeze,
      external_ranges: [].freeze,
      inverse_of: nil,
      superseded_by: nil,
      supersedes: nil
    }.freeze,
    varies_by: {
      schema_name: "variesBy",
      schema_url: "https://schema.org/variesBy",
      comment_lines: ["Indicates the property or properties by which the variants in a [[ProductGroup]] vary, e.g. their size, color etc. Schema.org properties can be referenced by their short name e.g. \"color\"; terms defined elsewhere can be referenced with their URIs."].freeze,
      ranges: ["DefinedTerm", "Text"].freeze,
      external_ranges: [].freeze,
      inverse_of: nil,
      superseded_by: nil,
      supersedes: nil
    }.freeze
  }.freeze
end

Instance Method Details

#has_variantObject

Indicates a [[Product]] that is a member of this [[ProductGroup]] (or [[ProductModel]]). Inverse-property: isVariantOf.



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

def has_variant
  read_property(:has_variant)
end

#has_variant=(value) ⇒ Object

Indicates a [[Product]] that is a member of this [[ProductGroup]] (or [[ProductModel]]). Inverse-property: isVariantOf.



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

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

#product_group_idObject

Indicates a textual identifier for a ProductGroup.



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

def product_group_id
  read_property(:product_group_id)
end

#product_group_id=(value) ⇒ Object

Indicates a textual identifier for a ProductGroup.



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

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

#varies_byObject

Indicates the property or properties by which the variants in a [[ProductGroup]] vary, e.g. their size, color etc. Schema.org properties can be referenced by their short name e.g. "color"; terms defined elsewhere can be referenced with their URIs.



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

def varies_by
  read_property(:varies_by)
end

#varies_by=(value) ⇒ Object

Indicates the property or properties by which the variants in a [[ProductGroup]] vary, e.g. their size, color etc. Schema.org properties can be referenced by their short name e.g. "color"; terms defined elsewhere can be referenced with their URIs.



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

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