Method: ComputedModel.filter_subfields
- Defined in:
- lib/computed_model.rb
.filter_subfields(subfields) ⇒ Array
Removes nil, true and false from the given array.
Normally you don't need to call it directly. ComputedModel::Model::ClassMethods#define_loader, ComputedModel::Model::ClassMethods#define_primary_loader, and ComputedModel::NormalizableArray#normalized will internally use this function.
83 84 85 |
# File 'lib/computed_model.rb', line 83 def self.filter_subfields(subfields) subfields.select { |x| x && x != true } end |