class AsposeSlidesCloud::FractionElement
Specifies the fraction object, consisting of a numerator and denominator separated by a fraction bar.
Attributes
Denominator
Fraction type
Numerator
Public Class Methods
Source
# File lib/aspose_slides_cloud/models/fraction_element.rb, line 38 def self.attribute_map super.merge({ :'fraction_type' => :'FractionType', :'numerator' => :'Numerator', :'denominator' => :'Denominator', }) end
Attribute mapping from ruby-style variable name to JSON key.
Source
# File lib/aspose_slides_cloud/models/fraction_element.rb, line 57 def initialize(attributes = {}) super if attributes.has_key?(:'FractionType') self.fraction_type = attributes[:'FractionType'] end if attributes.has_key?(:'Numerator') self.numerator = attributes[:'Numerator'] end if attributes.has_key?(:'Denominator') self.denominator = attributes[:'Denominator'] end self.type = 'Fraction' end
Initializes the object @param [Hash] attributes Model attributes in the form of hash
Source
# File lib/aspose_slides_cloud/models/fraction_element.rb, line 47 def self.swagger_types super.merge({ :'fraction_type' => :'String', :'numerator' => :'MathElement', :'denominator' => :'MathElement', }) end
Attribute type mapping.
Public Instance Methods
Source
# File lib/aspose_slides_cloud/models/fraction_element.rb, line 102 def ==(o) return true if self.equal?(o) self.class == o.class && type == o.type && fraction_type == o.fraction_type && numerator == o.numerator && denominator == o.denominator end
Checks equality by comparing each attribute. @param [Object] Object to be compared
Source
# File lib/aspose_slides_cloud/models/fraction_element.rb, line 113 def eql?(o) self == o end
@see the ‘==` method @param [Object] Object to be compared
Source
# File lib/aspose_slides_cloud/models/fraction_element.rb, line 92 def fraction_type=(fraction_type) validator = EnumAttributeValidator.new('String', ['Bar', 'Skewed', 'Linear', 'NoBar']) unless validator.valid?(fraction_type) fail ArgumentError, 'invalid value for "fraction_type", must be one of #{validator.allowable_values}.' end @fraction_type = fraction_type end
Custom attribute writer method checking allowed values (enum). @param [Object] fraction_type
Object to be assigned
Source
# File lib/aspose_slides_cloud/models/fraction_element.rb, line 119 def hash [type, fraction_type, numerator, denominator].hash end
Calculates hash code according to all attributes. @return [Fixnum] Hash code
Source
# File lib/aspose_slides_cloud/models/fraction_element.rb, line 76 def list_invalid_properties invalid_properties = super invalid_properties end
Show invalid properties with the reasons. Usually used together with valid? @return Array for valid properties with the reasons
Source
# File lib/aspose_slides_cloud/models/fraction_element.rb, line 83 def valid? return false if !super fraction_type_validator = EnumAttributeValidator.new('String', ['Bar', 'Skewed', 'Linear', 'NoBar']) return false unless fraction_type_validator.valid?(@fraction_type) true end
Check to see if the all the properties in the model are valid @return true if the model is valid