Class: AsposePdfCloud::BoxStyle

Inherits:
Object
  • Object
show all
Defined in:
lib/aspose_pdf_cloud/models/box_style.rb

Constant Summary collapse

CIRCLE =
"Circle".freeze
CHECK =
"Check".freeze
CROSS =
"Cross".freeze
DIAMOND =
"Diamond".freeze
SQUARE =
"Square".freeze
STAR =
"Star".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



38
39
40
41
42
43
44
45
# File 'lib/aspose_pdf_cloud/models/box_style.rb', line 38

def build_from_hash(value)
  # resolve issue with Concstant Name modification (ex: "FooName" to :FOO_NAME)
  # consantValues = BoxStyle.constants.select{|c| c.to_s == value}
  constantValues = BoxStyle.constants.select{ |const_name| BoxStyle.const_get(const_name) == value}
  
  raise "Invalid ENUM value #{value} for class #BoxStyle" if constantValues.empty?
  value
end