Class: AsposeSlidesCloud::NaryOperatorElement

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

Overview

Specifies an N-ary mathematical object, such as Summation and Integral.

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 = {}) ⇒ NaryOperatorElement

Initializes the object

Parameters:

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

    Model attributes in the form of hash



82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
# File 'lib/aspose_slides_cloud/models/nary_operator_element.rb', line 82

def initialize(attributes = {})
  super

  if attributes.has_key?(:'Base')
    self.base = attributes[:'Base']
  end

  if attributes.has_key?(:'Subscript')
    self.subscript = attributes[:'Subscript']
  end

  if attributes.has_key?(:'Superscript')
    self.superscript = attributes[:'Superscript']
  end

  if attributes.has_key?(:'Operator')
    self.operator = attributes[:'Operator']
  end

  if attributes.has_key?(:'LimitLocation')
    self.limit_location = attributes[:'LimitLocation']
  end

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

  if attributes.has_key?(:'HideSubscript')
    self.hide_subscript = attributes[:'HideSubscript']
  end

  if attributes.has_key?(:'HideSuperscript')
    self.hide_superscript = attributes[:'HideSuperscript']
  end
  self.type = 'NaryOperator'
end

Instance Attribute Details

#baseObject

Base argument



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

def base
  @base
end

#grow_to_match_operand_heightObject

Operator Character grows vertically to match its operand height



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

def grow_to_match_operand_height
  @grow_to_match_operand_height
end

#hide_subscriptObject

Hide Subscript



47
48
49
# File 'lib/aspose_slides_cloud/models/nary_operator_element.rb', line 47

def hide_subscript
  @hide_subscript
end

#hide_superscriptObject

Hide Superscript



50
51
52
# File 'lib/aspose_slides_cloud/models/nary_operator_element.rb', line 50

def hide_superscript
  @hide_superscript
end

#limit_locationObject

The location of limits (subscript and superscript)



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

def limit_location
  @limit_location
end

#operatorObject

Nary Operator Character



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

def operator
  @operator
end

#subscriptObject

Subscript argument



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

def subscript
  @subscript
end

#superscriptObject

Superscript argument



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

def superscript
  @superscript
end

Class Method Details

.attribute_mapObject

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



53
54
55
56
57
58
59
60
61
62
63
64
# File 'lib/aspose_slides_cloud/models/nary_operator_element.rb', line 53

def self.attribute_map
  super.merge({
    :'base' => :'Base',
    :'subscript' => :'Subscript',
    :'superscript' => :'Superscript',
    :'operator' => :'Operator',
    :'limit_location' => :'LimitLocation',
    :'grow_to_match_operand_height' => :'GrowToMatchOperandHeight',
    :'hide_subscript' => :'HideSubscript',
    :'hide_superscript' => :'HideSuperscript',
  })
end

.swagger_typesObject

Attribute type mapping.



67
68
69
70
71
72
73
74
75
76
77
78
# File 'lib/aspose_slides_cloud/models/nary_operator_element.rb', line 67

def self.swagger_types
  super.merge({
    :'base' => :'MathElement',
    :'subscript' => :'MathElement',
    :'superscript' => :'MathElement',
    :'operator' => :'String',
    :'limit_location' => :'String',
    :'grow_to_match_operand_height' => :'BOOLEAN',
    :'hide_subscript' => :'BOOLEAN',
    :'hide_superscript' => :'BOOLEAN',
  })
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



147
148
149
150
151
152
153
154
155
156
157
158
159
# File 'lib/aspose_slides_cloud/models/nary_operator_element.rb', line 147

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      type == o.type &&
      base == o.base &&
      subscript == o.subscript &&
      superscript == o.superscript &&
      operator == o.operator &&
      limit_location == o.limit_location &&
      grow_to_match_operand_height == o.grow_to_match_operand_height &&
      hide_subscript == o.hide_subscript &&
      hide_superscript == o.hide_superscript
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


163
164
165
# File 'lib/aspose_slides_cloud/models/nary_operator_element.rb', line 163

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



169
170
171
# File 'lib/aspose_slides_cloud/models/nary_operator_element.rb', line 169

def hash
  [type, base, subscript, superscript, operator, limit_location, grow_to_match_operand_height, hide_subscript, hide_superscript].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



121
122
123
124
# File 'lib/aspose_slides_cloud/models/nary_operator_element.rb', line 121

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



128
129
130
131
132
133
# File 'lib/aspose_slides_cloud/models/nary_operator_element.rb', line 128

def valid?
  return false if !super
  limit_location_validator = EnumAttributeValidator.new('String', ['NotDefined', 'UnderOver', 'SubscriptSuperscript'])
  return false unless limit_location_validator.valid?(@limit_location)
  true
end