class Perpetuity::Postgres::DateValue
Attributes
date[R]
Public Class Methods
from_sql(date_string)
click to toggle source
# File lib/perpetuity/postgres/date_value.rb, line 12 def self.from_sql date_string new(Date.parse(date_string)) end
new(date)
click to toggle source
# File lib/perpetuity/postgres/date_value.rb, line 8 def initialize date @date = date end
Public Instance Methods
to_date()
click to toggle source
# File lib/perpetuity/postgres/date_value.rb, line 16 def to_date date end
to_s()
click to toggle source
# File lib/perpetuity/postgres/date_value.rb, line 20 def to_s "'#{date.to_s}'::date" end
value()
click to toggle source
# File lib/perpetuity/postgres/date_value.rb, line 24 def value date end