Class: Bee

Inherits:
ApplicationRecord show all
Defined in:
app/models/bee.rb

Overview

This model holds letters for each spelling bee game.

Raises:

  • (ValidationError) —

    if ‘letters’ is not made of letters or repeats characters.

  • (ValidateError) —

    if ‘ranks’ is not an integer array of 4 numbers.

Instance Attribute Summary collapse

Instance Attribute Details

#letters ⇒ String

The letters of the game. (eg. “ABCDEFG”)

Returns:

  • (String) —

    the current value of letters



9
10
11
# File 'app/models/bee.rb', line 9

def letters
  @letters
end

#play_date ⇒ Date

The date of the game. (eg. ‘2024-11-08’)

Returns:

  • (Date) —

    the current value of play_date



9
10
11
# File 'app/models/bee.rb', line 9

def play_date
  @play_date
end

#ranks ⇒ Array<Integer>

The rank ranges for the game. (eg. [5, 10, 20, 40])

Returns:

  • (Array<Integer>) —

    the current value of ranks



9
10
11
# File 'app/models/bee.rb', line 9

def ranks
  @ranks
end