Class: AsposePdfCloud::PageLayout

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

Constant Summary collapse

SINGLE_PAGE =
"SinglePage".freeze
ONE_COLUMN =
"OneColumn".freeze
TWO_COLUMN_LEFT =
"TwoColumnLeft".freeze
TWO_COLUMN_RIGHT =
"TwoColumnRight".freeze
TWO_PAGE_LEFT =
"TwoPageLeft".freeze
TWO_PAGE_RIGHT =
"TwoPageRight".freeze
DEFAULT =
"Default".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/page_layout.rb', line 39

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