Class Sequel::Model::DatasetModule
In: lib/sequel/model/dataset_module.rb
Parent: ::Module

This Module subclass is used by Model.dataset_module to add dataset methods to classes. It adds a couple of features standard Modules, allowing you to use the same subset method you can call on Model, as well as making sure that public methods added to the module automatically have class methods created for them.

Methods

new   subset  

Public Class methods

Store the model related to this dataset module.

[Source]

    # File lib/sequel/model/dataset_module.rb, line 11
11:       def initialize(model)
12:         @model = model
13:       end

Public Instance methods

Define a named filter for this dataset, see Model.subset for details.

[Source]

    # File lib/sequel/model/dataset_module.rb, line 17
17:       def subset(name, *args, &block)
18:         define_method(name){filter(*args, &block)}
19:       end

[Validate]