Class: AsposePdfCloud::AnnotationType

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

Constant Summary collapse

TEXT =
"Text".freeze
CIRCLE =
"Circle".freeze
POLYGON =
"Polygon".freeze
POLY_LINE =
"PolyLine".freeze
LINE =
"Line".freeze
SQUARE =
"Square".freeze
FREE_TEXT =
"FreeText".freeze
HIGHLIGHT =
"Highlight".freeze
UNDERLINE =
"Underline".freeze
SQUIGGLY =
"Squiggly".freeze
STRIKE_OUT =
"StrikeOut".freeze
CARET =
"Caret".freeze
INK =
"Ink".freeze
"Link".freeze
"Popup".freeze
FILE_ATTACHMENT =
"FileAttachment".freeze
SOUND =
"Sound".freeze
MOVIE =
"Movie".freeze
SCREEN =
"Screen".freeze
WIDGET =
"Widget".freeze
WATERMARK =
"Watermark".freeze
TRAP_NET =
"TrapNet".freeze
PRINTER_MARK =
"PrinterMark".freeze
REDACTION =
"Redaction".freeze
STAMP =
"Stamp".freeze
RICH_MEDIA =
"RichMedia".freeze
UNKNOWN =
"Unknown".freeze
PDF3_D =
"PDF3D".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



60
61
62
63
64
65
66
67
# File 'lib/aspose_pdf_cloud/models/annotation_type.rb', line 60

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