Class: SmartRecruiters::AttendeeStatusValue

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

Constant Summary collapse

ACCEPTED =
'accepted'.freeze
DECLINED =
'declined'.freeze
PENDING =
'pending'.freeze
TENTATIVE =
'tentative'.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/attendee_status_value.rb', line 15

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