Class: SmartRecruiters::PostingStatus

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

Constant Summary collapse

PUBLIC =
'PUBLIC'.freeze
INTERNAL =
'INTERNAL'.freeze
NOT_PUBLISHED =
'NOT_PUBLISHED'.freeze
PRIVATE =
'PRIVATE'.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



15
16
17
18
19
# File 'lib/smart_recruiters/models/posting_status.rb', line 15

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