Class: SmartRecruiters::Visibility
- Inherits:
-
Object
- Object
- SmartRecruiters::Visibility
- Defined in:
- lib/smart_recruiters/models/visibility.rb
Constant Summary collapse
- PRIVATE =
'PRIVATE'.freeze
- DIRECT =
'DIRECT'.freeze
- OPEN =
'OPEN'.freeze
- EVERYONE =
'EVERYONE'.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/visibility.rb', line 15 def build_from_hash(value) constantValues = Visibility.constants.select { |c| Visibility::const_get(c) == value } raise "Invalid ENUM value #{value} for class #Visibility" if constantValues.empty? value end |