Method: Sequel::Plugins::InvertedSubsets.apply
- Defined in:
- lib/sequel/plugins/inverted_subsets.rb
.apply(model, &block) ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/sequel/plugins/inverted_subsets.rb', line 32 def self.apply(model, &block) model.instance_exec do @dataset_module_class = Class.new(@dataset_module_class) do Sequel.set_temp_name(self){"#{model.name}::@dataset_module_class(InvertedSubsets)"} include DatasetModuleMethods if block define_method(:inverted_subset_name, &block) private :inverted_subset_name end end end end |