Module: SchemaOrg::Mixins::AggregateRating

Includes:
Rating
Included in:
AggregateRating, EmployerAggregateRating
Defined in:
lib/schema_org/mixins/aggregate_rating.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Rating

#author, #author=, #best_rating, #best_rating=, #rating_explanation, #rating_explanation=, #rating_value, #rating_value=, #review_aspect, #review_aspect=, #worst_rating, #worst_rating=

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/aggregate_rating.rb', line 11

def self.schema_property_definitions
  {
    item_reviewed: {
      schema_name: "itemReviewed",
      schema_url: "https://schema.org/itemReviewed",
      comment_lines: ["The item that is being reviewed/rated."].freeze,
      ranges: ["Thing"].freeze,
      external_ranges: [].freeze,
      inverse_of: nil,
      superseded_by: nil,
      supersedes: nil
    }.freeze,
    rating_count: {
      schema_name: "ratingCount",
      schema_url: "https://schema.org/ratingCount",
      comment_lines: ["The count of total number of ratings."].freeze,
      ranges: ["Integer"].freeze,
      external_ranges: [].freeze,
      inverse_of: nil,
      superseded_by: nil,
      supersedes: nil
    }.freeze,
    review_count: {
      schema_name: "reviewCount",
      schema_url: "https://schema.org/reviewCount",
      comment_lines: ["The count of total number of reviews."].freeze,
      ranges: ["Integer"].freeze,
      external_ranges: [].freeze,
      inverse_of: nil,
      superseded_by: nil,
      supersedes: nil
    }.freeze
  }.freeze
end

Instance Method Details

#item_reviewedObject

The item that is being reviewed/rated.



47
48
49
# File 'lib/schema_org/mixins/aggregate_rating.rb', line 47

def item_reviewed
  read_property(:item_reviewed)
end

#item_reviewed=(value) ⇒ Object

The item that is being reviewed/rated.



52
53
54
# File 'lib/schema_org/mixins/aggregate_rating.rb', line 52

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

#rating_countObject

The count of total number of ratings.



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

def rating_count
  read_property(:rating_count)
end

#rating_count=(value) ⇒ Object

The count of total number of ratings.



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

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

#review_countObject

The count of total number of reviews.



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

def review_count
  read_property(:review_count)
end

#review_count=(value) ⇒ Object

The count of total number of reviews.



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

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