Class: Sworn::ReplayProtector::Custom

Inherits:
Object
  • Object
show all
Defined in:
lib/sworn/replay_protector/custom.rb

Instance Method Summary collapse

Constructor Details

#initialize(*options) ⇒ Custom

Returns a new instance of Custom.



4
5
6
# File 'lib/sworn/replay_protector/custom.rb', line 4

def initialize(*options)
  @evaluator, _ = options.flatten
end

Instance Method Details

#replayed?(oauth) ⇒ Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/sworn/replay_protector/custom.rb', line 8

def replayed?(oauth)
  @evaluator.call(oauth)
end