Class: PulpPythonClient::MetadataVersionEnum
- Inherits:
-
Object
- Object
- PulpPythonClient::MetadataVersionEnum
- Defined in:
- lib/pulp_python_client/models/metadata_version_enum.rb
Constant Summary collapse
- N1_0 =
"1.0".freeze
- N1_1 =
"1.1".freeze
- N1_2 =
"1.2".freeze
- N2_0 =
"2.0".freeze
- N2_1 =
"2.1".freeze
- N2_2 =
"2.2".freeze
- N2_3 =
"2.3".freeze
- N2_4 =
"2.4".freeze
Class Method Summary collapse
- .all_vars ⇒ Object
-
.build_from_hash(value) ⇒ String
Builds the enum from string.
Instance Method Summary collapse
-
#build_from_hash(value) ⇒ String
Builds the enum from string.
Class Method Details
.all_vars ⇒ Object
27 28 29 |
# File 'lib/pulp_python_client/models/metadata_version_enum.rb', line 27 def self.all_vars @all_vars ||= [N1_0, N1_1, N1_2, N2_0, N2_1, N2_2, N2_3, N2_4].freeze end |
.build_from_hash(value) ⇒ String
Builds the enum from string
34 35 36 |
# File 'lib/pulp_python_client/models/metadata_version_enum.rb', line 34 def self.build_from_hash(value) new.build_from_hash(value) end |
Instance Method Details
#build_from_hash(value) ⇒ String
Builds the enum from string
41 42 43 44 |
# File 'lib/pulp_python_client/models/metadata_version_enum.rb', line 41 def build_from_hash(value) return value if MetadataVersionEnum.all_vars.include?(value) raise "Invalid ENUM value #{value} for class #MetadataVersionEnum" end |