Module: Kiba::Extend::Transforms::Allable
- Included in:
- Clean::RegexpFindReplaceFieldVals, Clean::StripFields, CombineValues::FromFieldsWithDelimiter, Delete::DelimiterOnlyFieldValues, Delete::EmptyFieldValues, FilterRows::AllFieldsPopulated, FilterRows::AnyFieldsPopulated
- Defined in:
- lib/kiba/extend/transforms/allable.rb
Overview
Mixin module providing finalize_fields
method for transforms that
accept fields: :all
.
Usage
Any transform classes mixing in this module must have fields
as an
attr_reader
Set the fields
instance variable from user input as follows:
@fields = [fields].flatten
Add the following line as the first thing in the process
method:
finalize_fields(row) unless fields_set