Class: ETL::Transform::StringToTimeTransform

Inherits:
Transform
  • Object
show all
Defined in:
lib/etl/transform/string_to_time_transform.rb

Overview

Transform a String representation of a date to a Time instance

Instance Attribute Summary

Attributes inherited from Transform

#configuration, #control, #name

Instance Method Summary collapse

Methods inherited from Transform

benchmarks, #initialize, transform

Constructor Details

This class inherits a constructor from ETL::Transform::Transform

Instance Method Details

#transform(name, value, row) ⇒ Object

Transform the value using Time.parse



6
7
8
# File 'lib/etl/transform/string_to_time_transform.rb', line 6

def transform(name, value, row)
  Time.parse(value) unless value.nil?
end