OpenStruct allows the creation of data objects with arbitrary attributes. See OpenStruct for an example.
[Validate]