Class: AmzSpApi::AplusContentApiModel::DecoratorType

Inherits:
Object
  • Object
show all
Defined in:
lib/aplus-content-api-model/models/decorator_type.rb

Constant Summary collapse

LIST_ITEM =
'LIST_ITEM'.freeze
LIST_ORDERED =
'LIST_ORDERED'.freeze
LIST_UNORDERED =
'LIST_UNORDERED'.freeze
STYLE_BOLD =
'STYLE_BOLD'.freeze
STYLE_ITALIC =
'STYLE_ITALIC'.freeze
STYLE_LINEBREAK =
'STYLE_LINEBREAK'.freeze
STYLE_PARAGRAPH =
'STYLE_PARAGRAPH'.freeze
STYLE_UNDERLINE =
'STYLE_UNDERLINE'.freeze

Instance Method Summary collapse

Instance Method Details

#build_from_hash(value) ⇒ String

Builds the enum from string

Parameters:

  • The (String)

    enum value in the form of the string

Returns:

  • (String)

    The enum value



28
29
30
31
32
# File 'lib/aplus-content-api-model/models/decorator_type.rb', line 28

def build_from_hash(value)
  constantValues = DecoratorType.constants.select { |c| DecoratorType::const_get(c) == value }
  raise "Invalid ENUM value #{value} for class #DecoratorType" if constantValues.empty?
  value
end