Class: AsposePdfCloud::LineEnding

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

Constant Summary collapse

NONE =
"None".freeze
SQUARE =
"Square".freeze
CIRCLE =
"Circle".freeze
DIAMOND =
"Diamond".freeze
OPEN_ARROW =
"OpenArrow".freeze
CLOSED_ARROW =
"ClosedArrow".freeze
BUTT =
"Butt".freeze
R_OPEN_ARROW =
"ROpenArrow".freeze
R_CLOSED_ARROW =
"RClosedArrow".freeze
SLASH =
"Slash".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



42
43
44
45
46
47
48
49
# File 'lib/aspose_pdf_cloud/models/line_ending.rb', line 42

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