instance method round_time_arguments

Ruby on Rails 6.0.6

Since v6.0.6 Last seen in v6.0.6 Private

Signature

round_time_arguments(argument)

No documentation comment.

Parameters

argument req
Source
# File activejob/lib/active_job/test_helper.rb, line 665
      def round_time_arguments(argument)
        case argument
        when Time, ActiveSupport::TimeWithZone, DateTime
          argument.change(usec: 0)
        when Hash
          argument.transform_values { |value| round_time_arguments(value) }
        when Array
          argument.map { |element| round_time_arguments(element) }
        else
          argument
        end
      end

Defined in activejob/lib/active_job/test_helper.rb line 665 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveJob::TestHelper

Type at least 2 characters to search.

↑↓ navigate · open · esc close