Module: Kiba::Extend::Transforms::SingleWarnable

Overview

Mixin module providing do_warnings method for transforms.

If you have an input with 1000 rows missing an expected field, you don’t want 1000 warnings to STDOUT, so this handles ensuring a single warning will be sent

Usage

Transform classes using this should: include SingleWarnable.

The initialize method of a transform using this mixin should call setup_single_warning. Then, add_single_warning("The warning message") can be used from anywhere else in the transform.

Since:

  • 2.8.0

Class Method Summary collapse

Class Method Details

.single_warningsObject

Since:

  • 2.8.0



38
39
40
# File 'lib/kiba/extend/transforms/single_warnable.rb', line 38

def single_warnings
  @single_warnings
end