Class: RiceBubble::Attributes::Date

Inherits:
Base
  • Object
show all
Defined in:
lib/rice_bubble/attributes/date.rb

Instance Method Summary collapse

Methods inherited from Base

#description, #fetch, #initialize, #optional, #valid?

Constructor Details

This class inherits a constructor from RiceBubble::Attributes::Base

Instance Method Details

#call(value, path: '') ⇒ Object



4
5
6
# File 'lib/rice_bubble/attributes/date.rb', line 4

def call(value, path: '')
  super(value.to_date, path:)
end

#valid_typesObject



8
9
10
# File 'lib/rice_bubble/attributes/date.rb', line 8

def valid_types
  [::Date, ::Time, ::DateTime]
end