Method: Sequel::Plugins::BooleanSubsets.configure

Defined in:
lib/sequel/plugins/boolean_subsets.rb

.configure(model, &block) ⇒ Object

Create boolean subset methods for each boolean column.



32
33
34
35
36
37
38
39
40
# File 'lib/sequel/plugins/boolean_subsets.rb', line 32

def self.configure(model, &block)
  model.instance_exec do
    if block
      define_singleton_method(:boolean_subset_args, &block)
      singleton_class.send(:private, :boolean_subset_args)
    end
    create_boolean_subsets if @dataset
  end
end