Class: TestKaferiCloud::LinkHighlightingMode

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

Constant Summary collapse

NONE =
0.freeze
INVERT =
1.freeze
OUTLINE =
2.freeze
PUSH =
3.freeze
TOGGLE =
4.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



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

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