Class: SmartRecruiters::ConsentScope

Inherits:
Object
  • Object
show all
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

Instance Method Details

#build_from_hash(value) ⇒ String

Builds the enum from string

Parameters:

  • The (String)

    enum value in the form of the string

Returns:

  • (String)

    The enum value



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