Bracketology.Competitor behaviour (Grilla Bracketology v0.2.0) View Source

The "abstract" Competitor

  1. Has a nillable non-negative integer rank
  2. Has a nillable string score
  3. Has a non-nil competition type

Link to this section Summary

Types

In all foreseeable implementations, the score string will be either successfully parsed as a decimal or assumed to be nil or 0.

In all foreseeable implementations, the score string will be either successfully parsed as a decimal or assumed to be nil or 0.

t()

A Competitor has an integer rank and a string score.

Callbacks

Returns a string to (hopefully uniquely) label the Competitor

Link to this section Types

Specs

rank() :: nil | non_neg_integer()

In all foreseeable implementations, the score string will be either successfully parsed as a decimal or assumed to be nil or 0.

Specs

score() :: nil | String.t()

In all foreseeable implementations, the score string will be either successfully parsed as a decimal or assumed to be nil or 0.

Specs

t() :: %Bracketology.Competitor{
  competition_type: Bracketology.Constants.competition_type(),
  rank: rank(),
  score: score()
}

A Competitor has an integer rank and a string score.

Link to this section Callbacks

Specs

label(t()) :: String.t()

Returns a string to (hopefully uniquely) label the Competitor