Class: AvmClient::EnergyRating
- Inherits:
-
Object
- Object
- AvmClient::EnergyRating
- Defined in:
- lib/avm_client/models/energy_rating.rb
Constant Summary collapse
- A =
"A".freeze
- B =
"B".freeze
- C =
"C".freeze
- D =
"D".freeze
- E =
"E".freeze
- F =
"F".freeze
- G =
"G".freeze
- I =
"I".freeze
Class Method Summary collapse
-
.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
.build_from_hash(value) ⇒ String
Builds the enum from string
29 30 31 |
# File 'lib/avm_client/models/energy_rating.rb', line 29 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
36 37 38 39 40 |
# File 'lib/avm_client/models/energy_rating.rb', line 36 def build_from_hash(value) constantValues = EnergyRating.constants.select { |c| EnergyRating::const_get(c) == value } raise "Invalid ENUM value #{value} for class #EnergyRating" if constantValues.empty? value end |