Module: FreckleApi::Coercions::ClassMethods

Defined in:
lib/freckle_api/coercions.rb

Instance Method Summary collapse

Instance Method Details

#coerce_to_dateObject



20
21
22
# File 'lib/freckle_api/coercions.rb', line 20

def coerce_to_date
  Date.method(:parse).to_proc
end

#coerce_to_datetimeObject

TODO: timezone based on local machine TODO: beware nil values



16
17
18
# File 'lib/freckle_api/coercions.rb', line 16

def coerce_to_datetime
  DateTime.method(:parse).to_proc
end