Class: TestKaferiCloud::StampType
- Inherits:
-
Object
- Object
- TestKaferiCloud::StampType
- Defined in:
- lib/test_kaferi_cloud/models/stamp_type.rb
Constant Summary collapse
- TEXT =
0.freeze
- IMAGE =
1.freeze
- PAGE =
2.freeze
- PAGE_NUMBER =
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/stamp_type.rb', line 35 def build_from_hash(value) constantValues = StampType.constants.select{ |const_name| StampType.const_get(const_name) == value} raise "Invalid ENUM value #{value} for class #StampType" if constantValues.empty? value #constantValues[0] end |