Description

This module allows us to define a list of symbols defining which attributes will be serialized for a class.

Extend with class methods

A hash of instance variables that have been declared with seraialized_attributes and are not nil. This requires ruby 1.9.3 or higher

serializes the instance values of the defining object based on the list of serializable attributes. serialization to. defining values that are not serializable attributes list.

Parameters:

  • str (String) (defaults to: '')

    The string instance to append this

  • additional_attributes (Hash) (defaults to: {})

    An option key value hash for

serialized instance values at text nodes on a camelized element of the attribute name. You may pass in a block for evaluation against non nil values. We use an array for element attributes becuase misordering will break the xml and 1.8.7 does not support ordered hashes.

Parameters:

  • str (String) (defaults to: '')

    The string instance to which serialized data is appended

  • additional_attributes (Array) (defaults to: [])

    An array of additional attribute names.

Yields:

  • (value)

creates a XML tag with serialized attributes

SerializedAttributes is referenced in 0 repositories