Hi
On Dec 1, 2007 3:16 PM, Wayne E. Seguin <[EMAIL PROTECTED]> wrote:
> Ok, current thought is to keep a config lookup hash:
>
> module Sequel
> module Plugins
> Config = {}
> end
> end
>
> Usage:
> Config[ModelClass][PluginName] = {*options}
>
> class LineItem < Sequel::Model(:line_items)
> is_a :list, :field => :position
> end
>
>
> With a helper method in the class itself:
>
> LineItem.plugin_options[:field] # => :position
>
>
> One open question: Can anyone think of a case where we'd want to be able to
> use a single plugin twice on the same model?
May arise when sub-classing?
The following is possibly off-topic.
While strictly not a Sequel problem, I've been trying to merge
Sequel's functionality with Og's - hopefully this will continue to be
possible...
Og does allow std Ruby type sub-classing of models, so it is
conceivable that a parent 'is <plugin>' and then the subclass gets
that plugin again?
Mark
> Thanks,
>
> ~Wayne
>
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sequel-talk" 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/sequel-talk?hl=en
-~----------~----~----~----~------~----~------~--~---