soveran/ohm — Issue #44: Need hook for creation of `@_attributes` container
Author: tribalvibes
Created: 2012-03-05 08:37:38+00:00
State: open

In `Ohm::Model#initialize` please provide a hook by calling, e.g. `@_attributes ||= Hash.new { |hash, key| hash[key] = get(key) }` Note use of conditional assignment. Same in the 1.0 branch...please update to call `@_attributes ||= {}`. This is needed for proper support of typecasting using your style `cast[]` hook. Doing it via a factory method, i.e. `make_attributes` would be better yet.

Thanks!
.tv/