Class: SmartRecruiters::PostingStatus
- Inherits:
-
Object
- Object
- SmartRecruiters::PostingStatus
- 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
-
#build_from_hash(value) ⇒ String
Builds the enum from string.
Instance Method Details
#build_from_hash(value) ⇒ String
Builds the enum from string
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 |