On Saturday, June 10, 2017 at 4:48:48 PM UTC-7, Aryk Grosz wrote:
>
> What is the reason behind not allowing the create_class_methods to be 
> switched to true in the Base.plugin method:
>
> dataset_extend(m::DatasetMethods, :create_class_methods=>false)
>
>
> So if we have DatasetMethods, we know can only include it in the apply 
> function with "base.dataset_module do".
>
> There is probably some reason for this, I just haven't figured it out yet.
>

Adding the class methods automatically for dataset methods in plugins can 
lead to situations where class methods are added when it doesn't really 
make sense. Sequel::Plugins.def_dataset_methods exists to easily create 
class methods that call dataset methods of the same name.  You can review 
the plugins that ship with Sequel to see how this is used.

Thanks,
Jeremy

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to