Class: TestKaferiCloud::Rotation
- Inherits:
-
Object
- Object
- TestKaferiCloud::Rotation
- Defined in:
- lib/test_kaferi_cloud/models/rotation.rb
Constant Summary collapse
- NONE =
0.freeze
- ON_90 =
1.freeze
- ON_180 =
2.freeze
- ON_270 =
3.freeze
Instance Method Summary collapse
-
#build_from_hash(value) ⇒ Fixnum
Builds the enum from string.
Instance Method Details
#build_from_hash(value) ⇒ Fixnum
Builds the enum from string
35 36 37 38 39 40 |
# File 'lib/test_kaferi_cloud/models/rotation.rb', line 35 def build_from_hash(value) constantValues = Rotation.constants.select{ |const_name| Rotation.const_get(const_name) == value} raise "Invalid ENUM value #{value} for class #Rotation" if constantValues.empty? value #constantValues[0] end |