Class: WordleDictionary

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

Overview

This model represents the Dictionary used by Wordle. It contains a list of all valid 5 letter guesses and all valid 5 letter solutions

Raises:

  • (ValidationError)

    if the word is missing, not 5 characters or already exists

Instance Attribute Summary collapse

Instance Attribute Details

#is_valid_solutionBoolean

Specifies whether the word is a valid solution or not

Returns:

  • (Boolean)

    the current value of is_valid_solution



8
9
10
# File 'app/models/wordle_dictionary.rb', line 8

def is_valid_solution
  @is_valid_solution
end

#wordString

The 5 letter Word

Returns:

  • (String)

    the current value of word



8
9
10
# File 'app/models/wordle_dictionary.rb', line 8

def word
  @word
end