Class: SmartRecruiters::ConsentScope
- Inherits:
-
Object
- Object
- SmartRecruiters::ConsentScope
- Defined in:
- lib/smart_recruiters/models/consent_scope.rb
Constant Summary collapse
- SINGLE =
'Single'.freeze
- SMART_RECRUIT =
'SmartRecruit'.freeze
- SMART_CRM =
'SmartCRM'.freeze
- SMART_MESSAGESMS =
'SmartMessage:SMS'.freeze
- SMART_MESSAGEWHATS_APP =
'SmartMessage:WhatsApp'.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
16 17 18 19 20 |
# File 'lib/smart_recruiters/models/consent_scope.rb', line 16 def build_from_hash(value) constantValues = ConsentScope.constants.select { |c| ConsentScope::const_get(c) == value } raise "Invalid ENUM value #{value} for class #ConsentScope" if constantValues.empty? value end |