PG::TextEncoder::

Date class

This is a encoder class for conversion of Ruby Date values to PostgreSQL date type.

Public Instance Methods

encode(value)
# File lib/pg/text_encoder/date.rb, line 7
def encode(value)
        value.respond_to?(:strftime) ? value.strftime("%Y-%m-%d") : value
end