Class: Aesthetic

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

Overview

This model holds the aesthetic modifications for each game. It allows for customization of select colors, and font.

Raises:

  • (ValidationError) —

    if colors is not an array of valid hex colors

Instance Attribute Summary collapse

Instance Attribute Details

#colors ⇒ Array<String>

An array of hex color values stored as strings. (eg. “#000000”)

Returns:

  • (Array<String>) —

    the current value of colors



10
11
12
# File 'app/models/aesthetic.rb', line 10

def colors
  @colors
end

#font ⇒ String

The font style used for text within the game. (eg. “Arial”)

Returns:

  • (String) —

    the current value of font



10
11
12
# File 'app/models/aesthetic.rb', line 10

def font
  @font
end

#game_id ⇒ Integer

The foreign key that references the associated ‘Game` model. (eg. 1)

Returns:

  • (Integer) —

    the current value of game_id



10
11
12
# File 'app/models/aesthetic.rb', line 10

def game_id
  @game_id
end

#labels ⇒ Array<String>

An array of label names to match colors. (eg. “Background color”)

Returns:

  • (Array<String>) —

    the current value of labels



10
11
12
# File 'app/models/aesthetic.rb', line 10

def labels
  @labels
end