lib/chronicle/etl/transformers/transformer.rb in chronicle-etl-0.3.1 vs lib/chronicle/etl/transformers/transformer.rb in chronicle-etl-0.4.0

- old
+ new

@@ -1,17 +1,18 @@ module Chronicle module ETL # Abstract class representing an Transformer for an ETL job class Transformer extend Chronicle::ETL::Registry::SelfRegistering + include Chronicle::ETL::Configurable # Construct a new instance of this transformer. Options are passed in from a Runner # == Parameters: # options:: # Options for configuring this Transformer - def initialize(options = {}, extraction) - @options = options + def initialize(extraction, options = {}) @extraction = extraction + apply_options(options) end # @abstract Subclass is expected to implement #transform # @!method transform # The main entrypoint for transforming a record. Called by a Runner on each extracted record