What have you found for these years?


DataMapper violates LSP

DataMapper violates LSP

So a PropertySet is kind of an Array:

class PropertySet < Array

But in fact, it's not really an array,
it's more like a Hash, since PropertySet#[] has
hash semantics, and so do PropertySet#values_at.

They are delegated methods from Mash, and Mash is a
kind of Hash, that automatically convert a Symbol into
a String, a common practice in Ruby for map lookup.

It is better to include Enumerable instead of
extending from Array. The Array ancestor confused me....

0 retries:

Post a Comment

Note: Only a member of this blog may post a comment.

All texts are licensed under CC Attribution 3.0