Class: SchemaDotOrg::AggregateRating

Inherits:
SchemaType show all
Defined in:
app/models/schema_dot_org/aggregate_rating.rb

Overview

Constant Summary

Constants inherited from SchemaType

SchemaType::ROOT_ATTR, SchemaType::UNQUALIFIED_CLASS_NAME_REGEX

Instance Attribute Summary

Attributes inherited from SchemaType

#id_iri

Instance Method Summary collapse

Methods inherited from SchemaType

#_to_json_struct, attribute, #initialize, #to_json, #to_json_ld, #to_json_struct, #to_s, #un_namespaced_classname

Constructor Details

This class inherits a constructor from SchemaDotOrg::SchemaType

Instance Method Details

#bestRatingInteger

Returns:

  • (Integer)


16
# File 'app/models/schema_dot_org/aggregate_rating.rb', line 16

attribute :bestRating, Integer, default: 5

#ratingCountInteger

Returns:

  • (Integer)


14
# File 'app/models/schema_dot_org/aggregate_rating.rb', line 14

attribute :ratingCount, Integer

#ratingValueFloat

Allow decimal ratings (e.g., 4.5)

Returns:

  • (Float)

Validations:



10
# File 'app/models/schema_dot_org/aggregate_rating.rb', line 10

attribute :ratingValue, Float

#reviewCountInteger

Returns:

  • (Integer)

Validations:



12
# File 'app/models/schema_dot_org/aggregate_rating.rb', line 12

attribute :reviewCount, Integer

#worstRatingInteger

Returns:

  • (Integer)


18
# File 'app/models/schema_dot_org/aggregate_rating.rb', line 18

attribute :worstRating, Integer, default: 1