lib/chronicle/etl/transformers/transformer.rb in chronicle-etl-0.5.2 vs lib/chronicle/etl/transformers/transformer.rb in chronicle-etl-0.5.3
- old
+ new
@@ -8,9 +8,13 @@
# Construct a new instance of this transformer. Options are passed in from a Runner
# == Parameters:
# options::
# Options for configuring this Transformer
def initialize(extraction, options = {})
+ unless extraction.is_a?(Chronicle::ETL::Extraction)
+ raise Chronicle::ETL::RunnerTypeError, "Extracted should be a Chronicle::ETL::Extraction"
+ end
+
@extraction = extraction
apply_options(options)
end
# @abstract Subclass is expected to implement #transform