module ETL #:nodoc: module Transform #:nodoc: # Transform from one type to another class TypeTransform < ETL::Transform::Transform def initialize(control, configuration={}) super @type = configuration[:type] end # Transform the value def transform(name, value, row) case @type when :string value.to_s when :number value.to_i else raise "Unsupported type: #{@type}" end end end end end