Sha256: 1702aea70f18b414ec5a0aa6b0dce996f5878288f84353d7e21471fd3a3bec4e
Contents?: true
Size: 478 Bytes
Versions: 1
Compression:
Stored size: 478 Bytes
Contents
# LazyModel Wraps a JSON object and lazily maps its attributes to rich domain objects using either a set of default mappers (for Ruby's built-in types), or custom mappers specified by the client. The mapped values are memoized. Example: class Foo < LazyMapper one :id, Integer, from: 'iden' one :created_at, Time one :amount, Money, map: Money.method(:parse) many :users, User, map: ->(u) { User.new(u) } end ## License See `LICENSE` file.
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
lazy_mapper-0.1.0 | README.md |