Class AWS::Record::Model::Attributes::SortableIntegerAttr
In: lib/aws/record/model/attributes.rb
Parent: IntegerAttr

Methods

Public Class methods

Returns a serialized representation of the integer value suitable for storing in SimpleDB.

  attribute.serialize(123)
  #=> '123'

  # padded to the correct number of digits
  attribute.serialize('123', :range => (0..10_000)
  #=> '00123'

  # offset applied to make all values positive
  attribute.serialize('-55', :range => (-100..10_000)
  #=> '00045'

@param [Integer] integer The number to serialize. @param [Hash] options @option options [required,Range] :range A range that represents the

  minimum and maximum values this integer can be.
  The returned value will have an offset applied (if min is
  less than 0) and will be zero padded.

@return [String] A serialized representation of the integer.

Protected Class methods

[Validate]