Class: Ohm::Types::Date

Inherits:
Primitive show all
Defined in:
lib/ohm/contrib/typecast.rb

Instance Method Summary collapse

Methods inherited from Primitive

#==, #initialize, #respond_to?, #to_s

Methods inherited from Base

[], delegate_to, empty, #inspect

Constructor Details

This class inherits a constructor from Ohm::Types::Primitive

Instance Method Details

#objectObject



142
143
144
# File 'lib/ohm/contrib/typecast.rb', line 142

def object
  ::Date.parse(@raw)
end

#typeObject



146
147
148
# File 'lib/ohm/contrib/typecast.rb', line 146

def type
  ::Date
end