Module: Sequel::Plugins::SubsetConditions::ClassMethods
- Defined in:
- lib/sequel/plugins/subset_conditions.rb
Instance Method Summary collapse
-
#subset(name, *args, &block) ⇒ Object
Also create a method that returns the conditions the filter uses.
Instance Method Details
#subset(name, *args, &block) ⇒ Object
Also create a method that returns the conditions the filter uses.
29 30 31 32 33 34 |
# File 'lib/sequel/plugins/subset_conditions.rb', line 29 def subset(name, *args, &block) super cond = args cond = cond.first if cond.size == 1 def_dataset_method(:"#{name}_conditions"){filter_expr(cond, &block)} end |