instance method
secure_compare!
Ruby on Rails 7.2.3
Since v6.1.7.10Signature
secure_compare!(other_value, on_rotation: @on_rotation)
No documentation comment.
Parameters
-
other_valuereq -
on_rotationkey = @on_rotation
Source
# File activesupport/lib/active_support/secure_compare_rotator.rb, line 47
def secure_compare!(other_value, on_rotation: @on_rotation)
if secure_compare(@value, other_value)
true
elsif @rotate_values.any? { |value| secure_compare(value, other_value) }
on_rotation&.call
true
else
raise InvalidMatch
end
end
Defined in activesupport/lib/active_support/secure_compare_rotator.rb line 47
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::SecureCompareRotator