Class: TestKaferiCloud::HorizontalAlignment

Inherits:
Object
  • Object
show all
Defined in:
lib/test_kaferi_cloud/models/horizontal_alignment.rb

Constant Summary collapse

NONE =
0.freeze
LEFT =
1.freeze
CENTER =
2.freeze
RIGHT =
3.freeze

Instance Method Summary collapse

Instance Method Details

#build_from_hash(value) ⇒ Fixnum

Builds the enum from string

Parameters:

  • The (Fixnum)

    enum value in the form of the string

Returns:

  • (Fixnum)

    The enum value



35
36
37
38
39
40
# File 'lib/test_kaferi_cloud/models/horizontal_alignment.rb', line 35

def build_from_hash(value)
  constantValues = HorizontalAlignment.constants.select{ |const_name| HorizontalAlignment.const_get(const_name) == value}
  raise "Invalid ENUM value #{value} for class #HorizontalAlignment" if constantValues.empty?
  value
  #constantValues[0]
end