Class: Cda::Timestamp

Inherits:
Virtus::Attribute
  • Object
show all
Defined in:
lib/cda/timestamp.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.build_typeObject



7
8
9
# File 'lib/cda/timestamp.rb', line 7

def self.build_type(*)
  Axiom::Types::Date
end

Instance Method Details

#coerce(input) ⇒ Object



3
4
5
# File 'lib/cda/timestamp.rb', line 3

def coerce(input)
  input.is_a?(DateTime) ? input : super
end