Module | Sequel::Plugins::SplitValues::InstanceMethods |
In: |
lib/sequel/plugins/split_values.rb
|
If there isn‘t an entry in the values hash, but there is a noncolumn_values hash, look in that hash for the value.
# File lib/sequel/plugins/split_values.rb, line 47 47: def [](k) 48: super || (@noncolumn_values[k] if !@values.has_key?(k) && @noncolumn_values) 49: end
Check all entries in the values hash. If any of the keys are not columns, move the entry into the noncolumn_values hash.
# File lib/sequel/plugins/split_values.rb, line 53 53: def split_noncolumn_values 54: @values.keys.each do |k| 55: unless columns.include?(k) 56: (@noncolumn_values ||= {})[k] = @values.delete(k) 57: end 58: end 59: self 60: end