class PG::TextDecoder::Date
Constants
- ISO_DATE
Public Instance Methods
decode(string, tuple=nil, field=nil)
click to toggle source
# File lib/pg/text_decoder.rb, line 10 def decode(string, tuple=nil, field=nil) if string =~ ISO_DATE ::Date.new $1.to_i, $2.to_i, $3.to_i else string end end