Releases: crimsonknave/cot
Collection DSL, primary key and missing block.
Added DSL to collections. You can now declare the klass, sub_key and default_attributes. Backwards compatibility is supported even though it means initialize supports 1-3 parameters with two permutations of 2 parameters.
Added primary key DSL to frame.
Added missing block to frame. This block will execute if the value was not set on initialize. It is executed with the item as context, so it has access to all the other properties.
enum and enhanced property config
Added support for the enum keyword.
The property keyword can now take a block. It also has a new option: value. Value lets the user override the value of a property with the result of a block. This allows for support of nested objects.
Default attributes for collections
Updated the collections to take a hash of options, which now includes sub_key and default_attributes.
Default attributes will be set on each object in the collection.
Collections
Added collection object which is an array of objects. The collection will initialize them if they are not already. It also provides some top level methods such as changed?, errors and serializable_hash that traverse the collection.