Class: LaunchDarklyApi::Role
- Inherits:
-
Object
- Object
- LaunchDarklyApi::Role
- Defined in:
- lib/launchdarkly_api/models/role.rb
Constant Summary collapse
- WRITER =
'writer'.freeze
- READER =
'reader'.freeze
- ADMIN =
'admin'.freeze
- OWNER =
'owner'.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
26 27 28 29 30 |
# File 'lib/launchdarkly_api/models/role.rb', line 26 def build_from_hash(value) constantValues = Role.constants.select { |c| Role::const_get(c) == value } raise "Invalid ENUM value #{value} for class #Role" if constantValues.empty? value end |