Class: Authmac::TimestampChecker
- Inherits:
-
Object
- Object
- Authmac::TimestampChecker
- Defined in:
- lib/authmac/timestamp_checker.rb
Instance Method Summary collapse
-
#initialize(max_behind, max_ahead) ⇒ TimestampChecker
constructor
A new instance of TimestampChecker.
- #validate(timestamp) ⇒ Object
Constructor Details
#initialize(max_behind, max_ahead) ⇒ TimestampChecker
Returns a new instance of TimestampChecker.
3 4 5 6 |
# File 'lib/authmac/timestamp_checker.rb', line 3 def initialize(max_behind, max_ahead) @max_behind = max_behind @max_ahead = max_ahead end |
Instance Method Details
#validate(timestamp) ⇒ Object
8 9 10 |
# File 'lib/authmac/timestamp_checker.rb', line 8 def validate() not_too_old() and not_too_new() end |