Class: Configs::Flavors
- Defined in:
- scripts/00800 Studio/00000 Configs/00002 Flavors.rb
Overview
Configuration of flavors
Instance Attribute Summary collapse
-
#bitter ⇒ Integer
Get the ID of bitter flavor.
-
#dry ⇒ Integer
Get the ID of dry flavor.
-
#nature_disliking_flavor ⇒ Hash<Symbol => Array<Integer>>
List of nature disliking flavor by flavor.
-
#nature_liking_flavor ⇒ Hash<Symbol => Array<Integer>>
List of nature liking flavor by flavor.
-
#nature_with_no_preferences ⇒ Array<Integer>
List of nature with no preferences.
-
#sour ⇒ Integer
Get the ID of sour flavor.
-
#spicy ⇒ Integer
Get the ID of spicy flavor.
-
#sweet ⇒ Integer
Get the ID of sweet flavor.
Instance Method Summary collapse
-
#initialize ⇒ Flavors
constructor
A new instance of Flavors.
- #to_json
Constructor Details
#initialize ⇒ Flavors
Returns a new instance of Flavors.
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
# File 'scripts/00800 Studio/00000 Configs/00002 Flavors.rb', line 53 def initialize @spicy = 0 @dry = 1 @sweet = 2 @bitter = 3 @sour = 4 self.nature_with_no_preferences = %i[bashful docile hardy quirky serious] self.nature_liking_flavor = { spicy: %i[adamant brave naughty lonely], dry: %i[modest quiet rash mild], sweet: %i[timid jolly naive hasty], bitter: %i[calm careful sassy gentle], sour: %i[bold impish relaxed lax] } self.nature_disliking_flavor = { spicy: %i[modest timid calm bold], dry: %i[adamant jolly careful impish], sweet: %i[brave quiet sassy relaxed], bitter: %i[naughty rash naive lax], sour: %i[lonely mild hasty gentle] } end |
Instance Attribute Details
#bitter ⇒ Integer
Get the ID of bitter flavor
18 19 20 |
# File 'scripts/00800 Studio/00000 Configs/00002 Flavors.rb', line 18 def bitter @bitter end |
#dry ⇒ Integer
Get the ID of dry flavor
10 11 12 |
# File 'scripts/00800 Studio/00000 Configs/00002 Flavors.rb', line 10 def dry @dry end |
#nature_disliking_flavor ⇒ Hash<Symbol => Array<Integer>>
List of nature disliking flavor by flavor
34 35 36 |
# File 'scripts/00800 Studio/00000 Configs/00002 Flavors.rb', line 34 def nature_disliking_flavor @nature_disliking_flavor end |
#nature_liking_flavor ⇒ Hash<Symbol => Array<Integer>>
List of nature liking flavor by flavor
30 31 32 |
# File 'scripts/00800 Studio/00000 Configs/00002 Flavors.rb', line 30 def nature_liking_flavor @nature_liking_flavor end |
#nature_with_no_preferences ⇒ Array<Integer>
List of nature with no preferences
26 27 28 |
# File 'scripts/00800 Studio/00000 Configs/00002 Flavors.rb', line 26 def nature_with_no_preferences @nature_with_no_preferences end |
#sour ⇒ Integer
Get the ID of sour flavor
22 23 24 |
# File 'scripts/00800 Studio/00000 Configs/00002 Flavors.rb', line 22 def sour @sour end |
#spicy ⇒ Integer
Get the ID of spicy flavor
6 7 8 |
# File 'scripts/00800 Studio/00000 Configs/00002 Flavors.rb', line 6 def spicy @spicy end |
#sweet ⇒ Integer
Get the ID of sweet flavor
14 15 16 |
# File 'scripts/00800 Studio/00000 Configs/00002 Flavors.rb', line 14 def sweet @sweet end |
Instance Method Details
#to_json
76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'scripts/00800 Studio/00000 Configs/00002 Flavors.rb', line 76 def to_json(*) { klass: self.class.to_s, spicy: @spicy, dry: @dry, sweet: @sweet, bitter: @bitter, sour: @sour, nature_with_no_preferences: @nature_with_no_preferences, nature_liking_flavor: @nature_liking_flavor, nature_disliking_flavor: @nature_disliking_flavor }.to_json end |