Class | AWS::Record::Attributes::StringAttr |
In: |
lib/aws/record/attributes.rb
|
Parent: | BaseAttr |
Returns a serialized representation of the string value suitable for storing in SimpleDB. @param [String] string @param [Hash] options @return [String] The serialized string.
Returns the value cast to a string. Empty strings are returned as nil by default. Type casting is done by calling to_s on the value.
string_attr.type_cast(123) # => '123' string_attr.type_cast('') # => nil string_attr.type_cast('', :preserve_empty_strings => true) # => ''
@param [Mixed] value @param [Hash] options @option options [Boolean] :preserve_empty_strings (false) When true,
empty strings are preserved and not cast to nil.
@return [String,nil] The type casted value.