TMXCredit/flat_map — pull request #3 by akuzko (2014-01-15 13:44:57+00:00)
Title: 13165 open mapper approach

This is a very massive, yet important changeset for `flat_map`. It's more based on `0.0.2` version rather that `0.0.3`, and I'm pretty confident that further development will be based on this code. That's why new version has been bumped to `0.1.0`.

The ide behind new code is pretty simple: the basic mapper class is `OpenMapper`, which by default uses `OpenStruct` as it's target, but may use any other object. `OpenMapper`s may be used for mounting other mappers, managing flow of business logic, etc.

`ModelMapper` inherits from `OpenMapper` to better suite `ActiveRecord` models and behaves identically to original mappers. `FlatMap::ModelMapper` may be still referenced as `FlatMap::Mapper` for backward compatability.