Class: CacheValue
- Inherits:
-
Object
- Object
- CacheValue
- Defined in:
- lib/AuthenticationSDK/util/CacheValue.rb
Overview
Cache value object to store certificate data
Instance Attribute Summary collapse
-
#cert ⇒ Object
Returns the value of attribute cert.
-
#file_modified_time ⇒ Object
Returns the value of attribute file_modified_time.
-
#private_key ⇒ Object
Returns the value of attribute private_key.
Instance Method Summary collapse
- #empty? ⇒ Boolean
-
#initialize(private_key = nil, cert = nil, file_modified_time = nil) ⇒ CacheValue
constructor
A new instance of CacheValue.
- #to_s ⇒ Object
Constructor Details
#initialize(private_key = nil, cert = nil, file_modified_time = nil) ⇒ CacheValue
Returns a new instance of CacheValue.
5 6 7 8 9 |
# File 'lib/AuthenticationSDK/util/CacheValue.rb', line 5 def initialize(private_key = nil, cert = nil, file_modified_time = nil) @private_key = private_key @cert = cert @file_modified_time = file_modified_time end |
Instance Attribute Details
#cert ⇒ Object
Returns the value of attribute cert.
3 4 5 |
# File 'lib/AuthenticationSDK/util/CacheValue.rb', line 3 def cert @cert end |
#file_modified_time ⇒ Object
Returns the value of attribute file_modified_time.
3 4 5 |
# File 'lib/AuthenticationSDK/util/CacheValue.rb', line 3 def file_modified_time @file_modified_time end |
#private_key ⇒ Object
Returns the value of attribute private_key.
3 4 5 |
# File 'lib/AuthenticationSDK/util/CacheValue.rb', line 3 def private_key @private_key end |
Instance Method Details
#empty? ⇒ Boolean
15 16 17 |
# File 'lib/AuthenticationSDK/util/CacheValue.rb', line 15 def empty? @private_key.nil? && @cert.nil? && @file_modified_time.nil? end |
#to_s ⇒ Object
11 12 13 |
# File 'lib/AuthenticationSDK/util/CacheValue.rb', line 11 def to_s "CacheValue(private_key: #{@private_key ? 'present' : 'nil'}, cert: #{@cert ? 'present' : 'nil'}, file_modified_time: #{@file_modified_time})" end |