class Olympic::Rating::Base
The base rating. A rating is used to describe the performance of a unit, e.g. one team. This is just an abstraction of the rating system, and as such, doesn't actually implement the API.
Public Class Methods
required_fields()
click to toggle source
Returns a hash of the fields that are required on a {Olympic::Team} to make it compatible with the rating system. The base API requires no fields. However, if it were to require a `:rating` decimal field, it would have a value of something like this:
{ rating: [:decimal, { null: false, default: 100.2 }] }
The key is the name of the field, the value are options that are passed as options to the SQL column.
@return [Hash{Symbol => Array<(Symbol, Hash)>}]
# File lib/olympic/rating/base.rb, line 20 def self.required_fields {} end