Class: TestKaferiCloud::FontStyles
- Inherits:
-
Object
- Object
- TestKaferiCloud::FontStyles
- Defined in:
- lib/test_kaferi_cloud/models/font_styles.rb
Constant Summary collapse
- REGULAR =
0.freeze
- BOLD =
1.freeze
- ITALIC =
2.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
34 35 36 37 38 39 |
# File 'lib/test_kaferi_cloud/models/font_styles.rb', line 34 def build_from_hash(value) constantValues = FontStyles.constants.select{ |const_name| FontStyles.const_get(const_name) == value} raise "Invalid ENUM value #{value} for class #FontStyles" if constantValues.empty? value #constantValues[0] end |