Sha256: 36dd4339a69a3d883de04888bed9a3b76fb8dcb51cbdbfab5176a1d2af9f7a36

Contents?: true

Size: 228 Bytes

Versions: 10

Compression:

Stored size: 228 Bytes

Contents

module ActiveRemote
  module Typecasting
    class DateTimeTypecaster
      def self.call(value)
        value.to_datetime if value.respond_to?(:to_datetime)
      rescue NoMethodError, ArgumentError
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
active_remote-3.3.3 lib/active_remote/typecasting/date_time_typecaster.rb
active_remote-3.3.2 lib/active_remote/typecasting/date_time_typecaster.rb
active_remote-3.3.1 lib/active_remote/typecasting/date_time_typecaster.rb
active_remote-3.3.0 lib/active_remote/typecasting/date_time_typecaster.rb
active_remote-3.2.2 lib/active_remote/typecasting/date_time_typecaster.rb
active_remote-3.2.1 lib/active_remote/typecasting/date_time_typecaster.rb
active_remote-3.2.0 lib/active_remote/typecasting/date_time_typecaster.rb
active_remote-3.2.0.pre lib/active_remote/typecasting/date_time_typecaster.rb
active_remote-3.1.3 lib/active_remote/typecasting/date_time_typecaster.rb
active_remote-3.1.2 lib/active_remote/typecasting/date_time_typecaster.rb