Exception: ApiAuthenticator::InvalidTimeError

Inherits:
BaseError
  • Object
show all
Defined in:
lib/api_authenticator/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(upper_threshold, lower_threshold, actual_time) ⇒ InvalidTimeError

Returns a new instance of InvalidTimeError.



8
9
10
11
12
# File 'lib/api_authenticator/errors.rb', line 8

def initialize(upper_threshold, lower_threshold, actual_time)
  @upper_threshold = upper_threshold
  @lower_threshold = lower_threshold
  @actual_time = actual_time
end

Instance Attribute Details

#actual_timeObject (readonly)

Returns the value of attribute actual_time.



6
7
8
# File 'lib/api_authenticator/errors.rb', line 6

def actual_time
  @actual_time
end

#lower_thresholdObject (readonly)

Returns the value of attribute lower_threshold.



6
7
8
# File 'lib/api_authenticator/errors.rb', line 6

def lower_threshold
  @lower_threshold
end

#upper_thresholdObject (readonly)

Returns the value of attribute upper_threshold.



6
7
8
# File 'lib/api_authenticator/errors.rb', line 6

def upper_threshold
  @upper_threshold
end

Instance Method Details

#constructed_messageObject



14
15
16
# File 'lib/api_authenticator/errors.rb', line 14

def constructed_message
  "Invalid Time Error: upper threshold: #{@upper_threshold} lower threshold: #{@lower_threshold} actual time: #{@actual_time}"
end