Hi Roman,

> Can anybody clarify what's going on in this sample code?
> I think that Module#include? needs to test that one module is included
> into another.

In DataMapper, models are Enumerable, so the #include? method is from
Enumerable not Module. Try using #ancestors.include? for this use
case.

You can think of a model in DM as like an unscoped collection. It
responds to all of the same finder/enumerable methods as a collection.
The primary difference is that it doesn't maintain state, so you can't
push/pop/shift/unshift/delete or do things that would normally be done
on an array-like collection.

--

Dan
(dkubb)

-- 
You received this message because you are subscribed to the Google Groups 
"DataMapper" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/datamapper?hl=en.

Reply via email to