Method: Webhookdb::Replicator::Column#converter

Defined in:
lib/webhookdb/replicator/column.rb

#converterIsomorphicProc (readonly)

Sometimes we need to do some processing on the value provided by the external service so that the we get the data we want in the format we want. A common example is parsing various DateTime formats into our desired timestamp format. In these cases, we use a ‘converter`, which is an `IsomorphicProc` where both procs take the value retrieved from the external service and the resource object and return a value consistent with the column’s type attribute.

Returns:

  • (IsomorphicProc)

    The ‘ruby’ proc accepts (value, resource:, event:, enrichment:, service_integration:) and returns a value. The ‘sql’ proc takes an expression and returns a new expression.



319
320
321
# File 'lib/webhookdb/replicator/column.rb', line 319

def converter
  @converter
end