Module: SchemaOrg::Mixins::Rating

Includes:
Intangible
Included in:
AggregateRating, EndorsementRating, Rating
Defined in:
lib/schema_org/mixins/rating.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# File 'lib/schema_org/mixins/rating.rb', line 11

def self.schema_property_definitions
  {
    author: {
      schema_name: "author",
      schema_url: "https://schema.org/author",
      comment_lines: ["The author of this content or rating. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably."].freeze,
      ranges: ["Organization", "Person"].freeze,
      external_ranges: [].freeze,
      inverse_of: nil,
      superseded_by: nil,
      supersedes: nil
    }.freeze,
    best_rating: {
      schema_name: "bestRating",
      schema_url: "https://schema.org/bestRating",
      comment_lines: ["The highest value allowed in this rating system."].freeze,
      ranges: ["Number", "Text"].freeze,
      external_ranges: [].freeze,
      inverse_of: nil,
      superseded_by: nil,
      supersedes: nil
    }.freeze,
    rating_explanation: {
      schema_name: "ratingExplanation",
      schema_url: "https://schema.org/ratingExplanation",
      comment_lines: ["A short explanation (e.g. one to two sentences) providing background context and other information that led to the conclusion expressed in the rating. This is particularly applicable to ratings associated with \"fact check\" markup using [[ClaimReview]]."].freeze,
      ranges: ["Text"].freeze,
      external_ranges: [].freeze,
      inverse_of: nil,
      superseded_by: nil,
      supersedes: nil
    }.freeze,
    rating_value: {
      schema_name: "ratingValue",
      schema_url: "https://schema.org/ratingValue",
      comment_lines: ["The rating for the content.\\n\\nUsage guidelines:\\n\\n* Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similar Unicode symbols.\\n* Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator."].freeze,
      ranges: ["Number", "Text"].freeze,
      external_ranges: [].freeze,
      inverse_of: nil,
      superseded_by: nil,
      supersedes: nil
    }.freeze,
    review_aspect: {
      schema_name: "reviewAspect",
      schema_url: "https://schema.org/reviewAspect",
      comment_lines: ["This Review or Rating is relevant to this part or facet of the itemReviewed."].freeze,
      ranges: ["StructuredValue", "Text"].freeze,
      external_ranges: [].freeze,
      inverse_of: nil,
      superseded_by: nil,
      supersedes: nil
    }.freeze,
    worst_rating: {
      schema_name: "worstRating",
      schema_url: "https://schema.org/worstRating",
      comment_lines: ["The lowest value allowed in this rating system."].freeze,
      ranges: ["Number", "Text"].freeze,
      external_ranges: [].freeze,
      inverse_of: nil,
      superseded_by: nil,
      supersedes: nil
    }.freeze
  }.freeze
end

Instance Method Details

#authorObject

The author of this content or rating. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably.



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

def author
  read_property(:author)
end

#author=(value) ⇒ Object

The author of this content or rating. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably.



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

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

#best_ratingObject

The highest value allowed in this rating system.



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

def best_rating
  read_property(:best_rating)
end

#best_rating=(value) ⇒ Object

The highest value allowed in this rating system.



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

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

#rating_explanationObject

A short explanation (e.g. one to two sentences) providing background context and other information that led to the conclusion expressed in the rating. This is particularly applicable to ratings associated with "fact check" markup using [[ClaimReview]].



97
98
99
# File 'lib/schema_org/mixins/rating.rb', line 97

def rating_explanation
  read_property(:rating_explanation)
end

#rating_explanation=(value) ⇒ Object

A short explanation (e.g. one to two sentences) providing background context and other information that led to the conclusion expressed in the rating. This is particularly applicable to ratings associated with "fact check" markup using [[ClaimReview]].



102
103
104
# File 'lib/schema_org/mixins/rating.rb', line 102

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

#rating_valueObject

The rating for the content.\n\nUsage guidelines:\n\n* Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similar Unicode symbols.\n* Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator.



107
108
109
# File 'lib/schema_org/mixins/rating.rb', line 107

def rating_value
  read_property(:rating_value)
end

#rating_value=(value) ⇒ Object

The rating for the content.\n\nUsage guidelines:\n\n* Use values from 0123456789 (Unicode 'DIGIT ZERO' (U+0030) to 'DIGIT NINE' (U+0039)) rather than superficially similar Unicode symbols.\n* Use '.' (Unicode 'FULL STOP' (U+002E)) rather than ',' to indicate a decimal point. Avoid using these symbols as a readability separator.



112
113
114
# File 'lib/schema_org/mixins/rating.rb', line 112

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

#review_aspectObject

This Review or Rating is relevant to this part or facet of the itemReviewed.



117
118
119
# File 'lib/schema_org/mixins/rating.rb', line 117

def review_aspect
  read_property(:review_aspect)
end

#review_aspect=(value) ⇒ Object

This Review or Rating is relevant to this part or facet of the itemReviewed.



122
123
124
# File 'lib/schema_org/mixins/rating.rb', line 122

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

#worst_ratingObject

The lowest value allowed in this rating system.



127
128
129
# File 'lib/schema_org/mixins/rating.rb', line 127

def worst_rating
  read_property(:worst_rating)
end

#worst_rating=(value) ⇒ Object

The lowest value allowed in this rating system.



132
133
134
# File 'lib/schema_org/mixins/rating.rb', line 132

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