Method: PinterestSdkClient::ObjectiveType#build_from_hash
- Defined in:
- lib/pinterest_sdk/models/objective_type.rb
#build_from_hash(value) ⇒ String
Builds the enum from string
37 38 39 40 41 |
# File 'lib/pinterest_sdk/models/objective_type.rb', line 37 def build_from_hash(value) constantValues = ObjectiveType.constants.select { |c| ObjectiveType::const_get(c) == value } raise "Invalid ENUM value #{value} for class #ObjectiveType" if constantValues.empty? value end |