Method: Webhookdb::Replicator::Column#defaulter
- Defined in:
- lib/webhookdb/replicator/column.rb
#defaulter ⇒ IsomorphicProc (readonly)
If the value we retrieve from the data provided by the external service is nil, we often want to use a default value instead of nil. The ‘defaulter` is an `IsomorphicProc` where both procs take the resource object and return a default value that is used in the upsert. A common example is the `now` defaulter, which uses the current time as the default value.
337 338 339 |
# File 'lib/webhookdb/replicator/column.rb', line 337 def defaulter @defaulter end |