Module: ActiveSupport::Messages::Rotator

Included in:
Encryptor, Verifier
Defined in:
activesupport/lib/active_support/messages/rotator.rb

Overview

:nodoc:

Defined Under Namespace

Modules: Encryptor, Verifier

Instance Method Summary collapse

Instance Method Details

#initialize(on_rotation: nil, **options) ⇒ Object



6
7
8
9
10
11
12
# File 'activesupport/lib/active_support/messages/rotator.rb', line 6

def initialize(*, on_rotation: nil, **options)
  super

  @options   = options
  @rotations = []
  @on_rotation = on_rotation
end

#rotate(*secrets, **options) ⇒ Object



14
15
16
# File 'activesupport/lib/active_support/messages/rotator.rb', line 14

def rotate(*secrets, **options)
  @rotations << build_rotation(*secrets, @options.merge(options))
end