Class: AsposePdfCloud::PageMode

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

Constant Summary collapse

USE_NONE =
"UseNone".freeze
USE_OUTLINES =
"UseOutlines".freeze
USE_THUMBS =
"UseThumbs".freeze
FULL_SCREEN =
"FullScreen".freeze
USE_OC =
"UseOC".freeze
USE_ATTACHMENTS =
"UseAttachments".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/page_mode.rb', line 38

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