Method: Freeclimb::AnsweredBy#build_from_hash
- Defined in:
- lib/freeclimb/models/answered_by.rb
#build_from_hash(value) ⇒ String
Builds the enum from string
29 30 31 32 33 |
# File 'lib/freeclimb/models/answered_by.rb', line 29 def build_from_hash(value) constantValues = AnsweredBy.constants.select { |c| AnsweredBy.const_get(c) == value } raise "Invalid ENUM value #{value} for class #AnsweredBy" if constantValues.empty? value end |