Sha256: ec4dcb2840dd1a03c84e09bba31ec1f2780ec6c9993ef260887c864328d2c858
Contents?: true
Size: 258 Bytes
Versions: 3
Compression:
Stored size: 258 Bytes
Contents
require 'date' module RiceBubble class Attributes class Date < Base def valid?(value) value.respond_to?(:to_date) end def coerce(value) value.respond_to?(:to_date) ? value.to_date : value end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
rice_bubble-0.1.2 | lib/rice_bubble/attributes/date.rb |
rice_bubble-0.1.1 | lib/rice_bubble/attributes/date.rb |
rice_bubble-0.1.0 | lib/rice_bubble/attributes/date.rb |