Method: Axlsx.validate_angle

Defined in:
lib/axlsx/util/validators.rb

.validate_angle(v) ⇒ Boolean

Requires that the value is between -54000000 and 54000000

Parameters:

  • v (Any)

    The value validated

Returns:

  • (Boolean)

    true if the data is valid

Raises:

  • (ArgumentError)

    raised if the value cannot be converted to an integer between the allowed angle values for chart label rotation.



78
79
80
# File 'lib/axlsx/util/validators.rb', line 78

def self.validate_angle(v)
  raise ArgumentError, (ERR_ANGLE % v.inspect) unless (v.to_i >= -5400000 && v.to_i <= 5400000)
end