Class AWS::Record::Attributes::IntegerAttr
In: lib/aws/record/attributes.rb
Parent: BaseAttr

Methods

Public Class methods

@api private

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] raw_value The value to type cast to an integer. @return [Integer,nil] Returns the type casted integer or nil

[Validate]