class AsposeSlidesCloud::NaryOperatorElement

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

Attributes

base[RW]

Base argument

grow_to_match_operand_height[RW]

Operator Character grows vertically to match its operand height

hide_subscript[RW]

Hide Subscript

hide_superscript[RW]

Hide Superscript

limit_location[RW]

The location of limits (subscript and superscript)

operator[RW]

Nary Operator Character

subscript[RW]

Subscript argument

superscript[RW]

Superscript argument

Public Class Methods

attribute_map() click to toggle source

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

# 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
new(attributes = {}) click to toggle source

Initializes the object @param [Hash] attributes Model attributes in the form of hash

Calls superclass method AsposeSlidesCloud::MathElement::new
# 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
swagger_types() click to toggle source

Attribute type mapping.

# 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

Public Instance Methods

==(o) click to toggle source

Checks equality by comparing each attribute. @param [Object] Object to be compared

# 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) click to toggle source

@see the ‘==` method @param [Object] Object to be compared

# File lib/aspose_slides_cloud/models/nary_operator_element.rb, line 163
def eql?(o)
  self == o
end
hash() click to toggle source

Calculates hash code according to all attributes. @return [Fixnum] Hash code

# 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
limit_location=(limit_location) click to toggle source

Custom attribute writer method checking allowed values (enum). @param [Object] limit_location Object to be assigned

# File lib/aspose_slides_cloud/models/nary_operator_element.rb, line 137
def limit_location=(limit_location)
  validator = EnumAttributeValidator.new('String', ['NotDefined', 'UnderOver', 'SubscriptSuperscript'])
  unless validator.valid?(limit_location)
    fail ArgumentError, 'invalid value for "limit_location", must be one of #{validator.allowable_values}.'
  end
  @limit_location = limit_location
end
list_invalid_properties() click to toggle source

Show invalid properties with the reasons. Usually used together with valid? @return Array for valid properties with the reasons

# File lib/aspose_slides_cloud/models/nary_operator_element.rb, line 121
def list_invalid_properties
  invalid_properties = super
  invalid_properties
end
valid?() click to toggle source

Check to see if the all the properties in the model are valid @return true if the model is valid

Calls superclass method AsposeSlidesCloud::MathElement#valid?
# 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