module Sequel::Plugins::BooleanSubsets::ClassMethods
Private Instance Methods
boolean_subset_args(c)
click to toggle source
The arguments to use when automatically defining a boolean subset for the given column.
# File lib/sequel/plugins/boolean_subsets.rb, line 46 def boolean_subset_args(c) [c, {c=>true}] end
create_boolean_subsets()
click to toggle source
Add subset methods for all of the boolean columns in this model.
# File lib/sequel/plugins/boolean_subsets.rb, line 51 def create_boolean_subsets if cs = check_non_connection_error{columns} cs.each{|c| subset(*boolean_subset_args(c)) if db_schema[c][:type] == :boolean} end end