Class: Freeclimb::Language
- Inherits:
-
Object
- Object
- Freeclimb::Language
- Defined in:
- lib/freeclimb/models/language.rb
Constant Summary collapse
- CATALAN =
"ca-ES".freeze
- DANISH =
"da-DK".freeze
- GERMAN =
"de-DE".freeze
- ENGLISH_AU =
"en-AU".freeze
- ENGLISH_CA =
"en-CA".freeze
- ENGLISH_UK =
"en-GB".freeze
- ENGLISH_IN =
"en-IN".freeze
- ENGLISH_US =
"en-US".freeze
- ENGLISH_ES =
"es-ES".freeze
- ENGLISH_MX =
"es-MX".freeze
- FINNISH =
"fi-FI".freeze
- FRENCH_CA =
"fr-CA".freeze
- FRENCH_FR =
"fr-FR".freeze
- ITALIAN =
"it-IT".freeze
- JAPANESE =
"ja-JP".freeze
- KOREAN =
"ko-KR".freeze
- NORWEGIAN =
"nb-NO".freeze
- DUTCH =
"nl-NL".freeze
- POLISH =
"pl-PL".freeze
- PORTUGESE_BR =
"pt-BR".freeze
- PORTUGESE_PT =
"pt-PT".freeze
- RUSSIAN =
"ru-RU".freeze
- SWEDISH =
"sv-SE".freeze
- CHINESE_CN =
"zh-CN".freeze
- CHINESE_HK =
"zh-HK".freeze
- CHINESE_TW =
"zh-TW".freeze
Class Method Summary collapse
-
.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
.build_from_hash(value) ⇒ String
Builds the enum from string
48 49 50 |
# File 'lib/freeclimb/models/language.rb', line 48 def self.build_from_hash(value) new.build_from_hash(value) end |
Instance Method Details
#build_from_hash(value) ⇒ String
Builds the enum from string
55 56 57 58 59 |
# File 'lib/freeclimb/models/language.rb', line 55 def build_from_hash(value) constantValues = Language.constants.select { |c| Language::const_get(c) == value } raise "Invalid ENUM value #{value} for class #Language" if constantValues.empty? value end |