On 12 Oct 2009, at 21:27, Brian Smith wrote:
> I think it'd be fairly hard to check which order the methods were
> defined
Currently, yes, but something like...
module DataMapper::Model
def set_default_repository_name(name)
# some magic to set the repo name...
end
end
might avoid the issue?
I'm not happy about overriding (module-introduced) class methods to
implement behaviour. This looks like the template method pattern to
me, and I've found that a constant source of pain, and something I
seek to refactor out of my own code.
My objection is partly because I object to being forced to use
inheritance in Ruby, and partly because everything else in a resource
is defined using class methods from (ultimately) DataMapper::Model.
WDYT?
Ashley
--
http://www.patchspace.co.uk/
http://www.linkedin.com/in/ashleymoran
http://aviewfromafar.net/
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---