Class: Weblate::ColorEnum
- Inherits:
-
Object
- Object
- Weblate::ColorEnum
- Defined in:
- lib/weblate/models/color_enum.rb
Constant Summary collapse
- NAVY =
"navy".freeze
- BLUE =
"blue".freeze
- AQUA =
"aqua".freeze
- TEAL =
"teal".freeze
- OLIVE =
"olive".freeze
- GREEN =
"green".freeze
- LIME =
"lime".freeze
- YELLOW =
"yellow".freeze
- ORANGE =
"orange".freeze
- RED =
"red".freeze
- MAROON =
"maroon".freeze
- FUCHSIA =
"fuchsia".freeze
- PURPLE =
"purple".freeze
- BLACK =
"black".freeze
- GRAY =
"gray".freeze
- SILVER =
"silver".freeze
Class Method Summary collapse
- .all_vars ⇒ Object
-
.build_from_hash(value) ⇒ String
Builds the enum from string.
Instance Method Summary collapse
-
#build_from_hash(value) ⇒ String
Builds the enum from string.
Class Method Details
.all_vars ⇒ Object
35 36 37 |
# File 'lib/weblate/models/color_enum.rb', line 35 def self.all_vars @all_vars ||= [NAVY, BLUE, AQUA, TEAL, OLIVE, GREEN, LIME, YELLOW, ORANGE, RED, MAROON, FUCHSIA, PURPLE, BLACK, GRAY, SILVER].freeze end |
.build_from_hash(value) ⇒ String
Builds the enum from string
42 43 44 |
# File 'lib/weblate/models/color_enum.rb', line 42 def self.build_from_hash(value) new.build_from_hash(value) end |