From: Mathieu Bouchard Date: 2005-04-02T19:26:05+09:00 Subject: Re: Hash::MixIn and Python style Object#dict On Sat, 2 Apr 2005, Mathieu Bouchard wrote: > class MyHash; include HollowHash # (3) > def each_key(&b) > # blah blah blah > end > # further blah > end > class MyVerifiedHash < MyHash; include SimpleHashP; end woops, make that: class MyHash; include HollowHash; include SimpleStringP # (3) def each_key(&b) # blah blah blah end # further blah end class MyVerifiedHash < MyHash; include SimpleHashP::Contract; end SimpleHashP is the "declarator" module, that asserts that a given module supports a feature set. SimpleHashP::Contract is a "verifier" module. However there is currently still no hint that a given module _wants_ an implementation of a given feature set in the way that HollowHash wants a SimpleHashP without providing a default implementation of it. _____________________________________________________________________ Mathieu Bouchard -=- Montr�al QC Canada -=- http://artengine.ca/matju