Class AWS::Record::IntegerAttribute
In: lib/aws/record/attributes/integer.rb
Parent: Attribute

@private

Methods

Public Class methods

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

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

@param [Integer] integer The number to serialize. @param [Hash] options @return [String] A serialized representation of the integer.

Returns value cast to an integer. Empty strings are cast to nil by default. Type casting is done by calling to_i on the value.

  int_attribute.type_cast('123')
  #=> 123

  int_attribute.type_cast('')
  #=> nil

@param [Mixed] value The value to type cast to an integer. @return [Integer,nil] Returns the type casted integer or nil

[Validate]