Module: SchemaOrg::Mixins::ListItem

Includes:
Intangible
Included in:
ListItem, HowToDirection, HowToItem, HowToSection, HowToStep, HowToTip
Defined in:
lib/schema_org/mixins/list_item.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/list_item.rb', line 11

def self.schema_property_definitions
  {
    item: {
      schema_name: "item",
      schema_url: "https://schema.org/item",
      comment_lines: ["An entity represented by an entry in a list or data feed (e.g. an 'artist' in a list of 'artists')."].freeze,
      ranges: ["Thing"].freeze,
      external_ranges: [].freeze,
      inverse_of: nil,
      superseded_by: nil,
      supersedes: nil
    }.freeze,
    next_item: {
      schema_name: "nextItem",
      schema_url: "https://schema.org/nextItem",
      comment_lines: ["A link to the ListItem that follows the current one."].freeze,
      ranges: ["ListItem"].freeze,
      external_ranges: [].freeze,
      inverse_of: nil,
      superseded_by: nil,
      supersedes: nil
    }.freeze,
    position: {
      schema_name: "position",
      schema_url: "https://schema.org/position",
      comment_lines: ["The position of an item in a series or sequence of items."].freeze,
      ranges: ["Integer", "Text"].freeze,
      external_ranges: [].freeze,
      inverse_of: nil,
      superseded_by: nil,
      supersedes: nil
    }.freeze,
    previous_item: {
      schema_name: "previousItem",
      schema_url: "https://schema.org/previousItem",
      comment_lines: ["A link to the ListItem that precedes the current one."].freeze,
      ranges: ["ListItem"].freeze,
      external_ranges: [].freeze,
      inverse_of: nil,
      superseded_by: nil,
      supersedes: nil
    }.freeze
  }.freeze
end

Instance Method Details

#itemObject

An entity represented by an entry in a list or data feed (e.g. an 'artist' in a list of 'artists').



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

def item
  read_property(:item)
end

#item=(value) ⇒ Object

An entity represented by an entry in a list or data feed (e.g. an 'artist' in a list of 'artists').



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

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

#next_itemObject

A link to the ListItem that follows the current one.



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

def next_item
  read_property(:next_item)
end

#next_item=(value) ⇒ Object

A link to the ListItem that follows the current one.



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

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

#positionObject

The position of an item in a series or sequence of items.



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

def position
  read_property(:position)
end

#position=(value) ⇒ Object

The position of an item in a series or sequence of items.



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

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

#previous_itemObject

A link to the ListItem that precedes the current one.



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

def previous_item
  read_property(:previous_item)
end

#previous_item=(value) ⇒ Object

A link to the ListItem that precedes the current one.



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

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