Class: FlatApi::GroupType
- Inherits:
-
Object
- Object
- FlatApi::GroupType
- Defined in:
- lib/flat_api/models/group_type.rb
Constant Summary collapse
- GENERIC =
"generic".freeze
- CLASS_TEACHERS =
"classTeachers".freeze
- CLASS_STUDENTS =
"classStudents".freeze
Instance Method Summary collapse
-
#build_from_hash(value) ⇒ String
Builds the enum from string.
Instance Method Details
#build_from_hash(value) ⇒ String
Builds the enum from string
25 26 27 28 29 |
# File 'lib/flat_api/models/group_type.rb', line 25 def build_from_hash(value) constantValues = GroupType.constants.select{|c| GroupType::const_get(c) == value} raise "Invalid ENUM value #{value} for class #GroupType" if constantValues.empty? value end |