aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/messages/rotation_configuration.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/lib/active_support/messages/rotation_configuration.rb')
-rw-r--r--activesupport/lib/active_support/messages/rotation_configuration.rb22
1 files changed, 22 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/messages/rotation_configuration.rb b/activesupport/lib/active_support/messages/rotation_configuration.rb
new file mode 100644
index 0000000000..bd50d6d348
--- /dev/null
+++ b/activesupport/lib/active_support/messages/rotation_configuration.rb
@@ -0,0 +1,22 @@
+# frozen_string_literal: true
+
+module ActiveSupport
+ module Messages
+ class RotationConfiguration # :nodoc:
+ attr_reader :signed, :encrypted
+
+ def initialize
+ @signed, @encrypted = [], []
+ end
+
+ def rotate(kind, *args)
+ case kind
+ when :signed
+ @signed << args
+ when :encrypted
+ @encrypted << args
+ end
+ end
+ end
+ end
+end