Class: AsposePdfCloud::SignatureSubjectNameElements

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

Constant Summary collapse

CN =
"CN".freeze
O =
"O".freeze
L =
"L".freeze
OU =
"OU".freeze
S =
"S".freeze
C =
"C".freeze
E =
"E".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



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

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