First page Back Continue Last page Overview Text

Notes:


(4 secs) To implement this is actually fairly simple. Here is a simplified version of Sequel::Model's plugin method.

You just need to check if submodules are present, and extend or include them in the class if so.

Now, you could accomplish the same thing using the extended method of the the class methods module, or the included method of the instance methods module.

But some plugins may have only class method modules and some may have only instance method modules, which is why a separate method is a superior solution.

http://github.com/jeremyevans/sequel/blob/3.10.0/lib/sequel/model/plugins.rb#L29