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

Base class for all of the AWS::Record attributes.

Methods

Attributes

name  [R]  @return [String] The name of this attribute
options  [R]  @return [Hash] Attribute options passed to the constructor.

Public Class methods

@return [Boolean] Returns true if this attribute type can be used

  with the +:set => true+ option.  Certain attirbutes can not
  be represented with multiple values (like BooleanAttr).

@param [String] serialized_value The raw value returned from AWS. @return [Mixed] Returns the type-casted deserialized value.

@param [Symbol] Name of this attribute. It should be a name that

  is safe to use as a method.

@param [Hash] options @option options [String] :persist_as Defaults to the name of the

  attribute.  You can pass a string to specify what the attribute
  will be named in the backend storage.

@option options [Boolean] :set (false) When true this attribute can

  accept multiple unique values.

Protected Class methods

Public Instance methods

@return Returns the default value for this attribute.

@param [String] The serialized string value. @return [Mixed] Returns a deserialized type-casted value.

@return [String] Returns the name this attribute will use

  in the storage backend.

Takes the type casted value and serializes it @param [Mixed] A single value to serialize. @return [Mixed] Returns the serialized value.

@return [Boolean] Returns true if this attribute can have

  multiple values.

@param [Mixed] A single value to type cast. @return [Mixed] Returns the type casted value.

[Validate]