Class: AsposeSlidesCloud::DelimiterElement

Inherits:
MathElement show all
Defined in:
lib/aspose_slides_cloud/models/delimiter_element.rb

Overview

Delimiter element

Instance Attribute Summary collapse

Attributes inherited from MathElement

#type

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseObject

#_deserialize, #_to_hash, #build_from_hash, #to_body, #to_hash, #to_s

Constructor Details

#initialize(attributes = {}) ⇒ DelimiterElement

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# File 'lib/aspose_slides_cloud/models/delimiter_element.rb', line 72

def initialize(attributes = {})
  super

  if attributes.has_key?(:'Arguments')
    if (value = attributes[:'Arguments']).is_a?(Array)
      self.arguments = value
    end
  end

  if attributes.has_key?(:'BeginningCharacter')
    self.beginning_character = attributes[:'BeginningCharacter']
  end

  if attributes.has_key?(:'SeparatorCharacter')
    self.separator_character = attributes[:'SeparatorCharacter']
  end

  if attributes.has_key?(:'EndingCharacter')
    self.ending_character = attributes[:'EndingCharacter']
  end

  if attributes.has_key?(:'GrowToMatchOperandHeight')
    self.grow_to_match_operand_height = attributes[:'GrowToMatchOperandHeight']
  end

  if attributes.has_key?(:'DelimiterShape')
    self.delimiter_shape = attributes[:'DelimiterShape']
  end
  self.type = 'Delimiter'
end

Instance Attribute Details

#argumentsObject

Arguments



29
30
31
# File 'lib/aspose_slides_cloud/models/delimiter_element.rb', line 29

def arguments
  @arguments
end

#beginning_characterObject

Beginning character



32
33
34
# File 'lib/aspose_slides_cloud/models/delimiter_element.rb', line 32

def beginning_character
  @beginning_character
end

#delimiter_shapeObject

Delimiter shape



44
45
46
# File 'lib/aspose_slides_cloud/models/delimiter_element.rb', line 44

def delimiter_shape
  @delimiter_shape
end

#ending_characterObject

Ending character



38
39
40
# File 'lib/aspose_slides_cloud/models/delimiter_element.rb', line 38

def ending_character
  @ending_character
end

#grow_to_match_operand_heightObject

Grow to match operand height



41
42
43
# File 'lib/aspose_slides_cloud/models/delimiter_element.rb', line 41

def grow_to_match_operand_height
  @grow_to_match_operand_height
end

#separator_characterObject

Separator character



35
36
37
# File 'lib/aspose_slides_cloud/models/delimiter_element.rb', line 35

def separator_character
  @separator_character
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



47
48
49
50
51
52
53
54
55
56
# File 'lib/aspose_slides_cloud/models/delimiter_element.rb', line 47

def self.attribute_map
  super.merge({
    :'arguments' => :'Arguments',
    :'beginning_character' => :'BeginningCharacter',
    :'separator_character' => :'SeparatorCharacter',
    :'ending_character' => :'EndingCharacter',
    :'grow_to_match_operand_height' => :'GrowToMatchOperandHeight',
    :'delimiter_shape' => :'DelimiterShape',
  })
end

.swagger_typesObject

Attribute type mapping.



59
60
61
62
63
64
65
66
67
68
# File 'lib/aspose_slides_cloud/models/delimiter_element.rb', line 59

def self.swagger_types
  super.merge({
    :'arguments' => :'Array<MathElement>',
    :'beginning_character' => :'String',
    :'separator_character' => :'String',
    :'ending_character' => :'String',
    :'grow_to_match_operand_height' => :'BOOLEAN',
    :'delimiter_shape' => :'String',
  })
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



131
132
133
134
135
136
137
138
139
140
141
# File 'lib/aspose_slides_cloud/models/delimiter_element.rb', line 131

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      type == o.type &&
      arguments == o.arguments &&
      beginning_character == o.beginning_character &&
      separator_character == o.separator_character &&
      ending_character == o.ending_character &&
      grow_to_match_operand_height == o.grow_to_match_operand_height &&
      delimiter_shape == o.delimiter_shape
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


145
146
147
# File 'lib/aspose_slides_cloud/models/delimiter_element.rb', line 145

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



151
152
153
# File 'lib/aspose_slides_cloud/models/delimiter_element.rb', line 151

def hash
  [type, arguments, beginning_character, separator_character, ending_character, grow_to_match_operand_height, delimiter_shape].hash
end

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



105
106
107
108
# File 'lib/aspose_slides_cloud/models/delimiter_element.rb', line 105

def list_invalid_properties
  invalid_properties = super
  invalid_properties
end

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



112
113
114
115
116
117
# File 'lib/aspose_slides_cloud/models/delimiter_element.rb', line 112

def valid?
  return false if !super
  delimiter_shape_validator = EnumAttributeValidator.new('String', ['Centered', 'Match'])
  return false unless delimiter_shape_validator.valid?(@delimiter_shape)
  true
end