Class: SmartRecruiters::ConsentDecisionStatus

Inherits:
Object
  • Object
show all
Defined in:
lib/smart_recruiters/models/consent_decision_status.rb

Constant Summary collapse

ACQUIRED =
'acquired'.freeze
DECLINED =
'declined'.freeze
REQUIRED =
'required'.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



14
15
16
17
18
# File 'lib/smart_recruiters/models/consent_decision_status.rb', line 14

def build_from_hash(value)
  constantValues = ConsentDecisionStatus.constants.select { |c| ConsentDecisionStatus::const_get(c) == value }
  raise "Invalid ENUM value #{value} for class #ConsentDecisionStatus" if constantValues.empty?
  value
end