Class: SmartRecruiters::CandidateStatusEnum

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

Constant Summary collapse

LEAD =
'LEAD'.freeze
NEW =
'NEW'.freeze
IN_REVIEW =
'IN_REVIEW'.freeze
INTERVIEW =
'INTERVIEW'.freeze
OFFERED =
'OFFERED'.freeze
HIRED =
'HIRED'.freeze
REJECTED =
'REJECTED'.freeze
WITHDRAWN =
'WITHDRAWN'.freeze
TRANSFERRED =
'TRANSFERRED'.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



20
21
22
23
24
# File 'lib/smart_recruiters/models/candidate_status_enum.rb', line 20

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