Module: SchemaOrg::Mixins::ItemList

Includes:
Intangible
Included in:
ItemList, BreadcrumbList, HowToSection, HowToStep, OfferCatalog
Defined in:
lib/schema_org/mixins/item_list.rb

Class Method Summary collapse

Instance Method Summary collapse

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
45
46
47
48
49
50
51
52
53
54
# File 'lib/schema_org/mixins/item_list.rb', line 11

def self.schema_property_definitions
  {
    aggregate_element: {
      schema_name: "aggregateElement",
      schema_url: "https://schema.org/aggregateElement",
      comment_lines: ["Indicates a prototype of the elements in the list that is used to hold aggregate information (ratings, offers, etc.)."].freeze,
      ranges: ["Thing"].freeze,
      external_ranges: [].freeze,
      inverse_of: nil,
      superseded_by: nil,
      supersedes: nil
    }.freeze,
    item_list_element: {
      schema_name: "itemListElement",
      schema_url: "https://schema.org/itemListElement",
      comment_lines: ["For itemListElement values, you can use simple strings (e.g. \"Peter\", \"Paul\", \"Mary\"), existing entities, or use ListItem.\\n\\nText values are best if the elements in the list are plain strings. Existing entities are best for a simple, unordered list of existing things in your data. ListItem is used with ordered lists when you want to provide additional context about the element in that list or when the same item might be in different places in different lists.\\n\\nNote: The order of elements in your mark-up is not sufficient for indicating the order or elements.  Use ListItem with a 'position' property in such cases."].freeze,
      ranges: ["ListItem", "Text", "Thing"].freeze,
      external_ranges: [].freeze,
      inverse_of: nil,
      superseded_by: nil,
      supersedes: nil
    }.freeze,
    item_list_order: {
      schema_name: "itemListOrder",
      schema_url: "https://schema.org/itemListOrder",
      comment_lines: ["Type of ordering (e.g. Ascending, Descending, Unordered)."].freeze,
      ranges: ["ItemListOrderType", "Text"].freeze,
      external_ranges: [].freeze,
      inverse_of: nil,
      superseded_by: nil,
      supersedes: nil
    }.freeze,
    number_of_items: {
      schema_name: "numberOfItems",
      schema_url: "https://schema.org/numberOfItems",
      comment_lines: ["The number of items in an ItemList. Note that some descriptions might not fully describe all items in a list (e.g., multi-page pagination); in such cases, the numberOfItems would be for the entire list."].freeze,
      ranges: ["Integer"].freeze,
      external_ranges: [].freeze,
      inverse_of: nil,
      superseded_by: nil,
      supersedes: nil
    }.freeze
  }.freeze
end

Instance Method Details

#aggregate_elementObject

Indicates a prototype of the elements in the list that is used to hold aggregate information (ratings, offers, etc.).



57
58
59
# File 'lib/schema_org/mixins/item_list.rb', line 57

def aggregate_element
  read_property(:aggregate_element)
end

#aggregate_element=(value) ⇒ Object

Indicates a prototype of the elements in the list that is used to hold aggregate information (ratings, offers, etc.).



62
63
64
# File 'lib/schema_org/mixins/item_list.rb', line 62

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

#item_list_elementObject

For itemListElement values, you can use simple strings (e.g. "Peter", "Paul", "Mary"), existing entities, or use ListItem.\n\nText values are best if the elements in the list are plain strings. Existing entities are best for a simple, unordered list of existing things in your data. ListItem is used with ordered lists when you want to provide additional context about the element in that list or when the same item might be in different places in different lists.\n\nNote: The order of elements in your mark-up is not sufficient for indicating the order or elements. Use ListItem with a 'position' property in such cases.



67
68
69
# File 'lib/schema_org/mixins/item_list.rb', line 67

def item_list_element
  read_property(:item_list_element)
end

#item_list_element=(value) ⇒ Object

For itemListElement values, you can use simple strings (e.g. "Peter", "Paul", "Mary"), existing entities, or use ListItem.\n\nText values are best if the elements in the list are plain strings. Existing entities are best for a simple, unordered list of existing things in your data. ListItem is used with ordered lists when you want to provide additional context about the element in that list or when the same item might be in different places in different lists.\n\nNote: The order of elements in your mark-up is not sufficient for indicating the order or elements. Use ListItem with a 'position' property in such cases.



72
73
74
# File 'lib/schema_org/mixins/item_list.rb', line 72

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

#item_list_orderObject

Type of ordering (e.g. Ascending, Descending, Unordered).



77
78
79
# File 'lib/schema_org/mixins/item_list.rb', line 77

def item_list_order
  read_property(:item_list_order)
end

#item_list_order=(value) ⇒ Object

Type of ordering (e.g. Ascending, Descending, Unordered).



82
83
84
# File 'lib/schema_org/mixins/item_list.rb', line 82

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

#number_of_itemsObject

The number of items in an ItemList. Note that some descriptions might not fully describe all items in a list (e.g., multi-page pagination); in such cases, the numberOfItems would be for the entire list.



87
88
89
# File 'lib/schema_org/mixins/item_list.rb', line 87

def number_of_items
  read_property(:number_of_items)
end

#number_of_items=(value) ⇒ Object

The number of items in an ItemList. Note that some descriptions might not fully describe all items in a list (e.g., multi-page pagination); in such cases, the numberOfItems would be for the entire list.



92
93
94
# File 'lib/schema_org/mixins/item_list.rb', line 92

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