Module: HerdstWorker::ExpiringCredentials
- Defined in:
- lib/herdst_worker/configuration/metadata.rb
Instance Attribute Summary collapse
-
#expiry_timestamp ⇒ Object
Returns the value of attribute expiry_timestamp.
Instance Method Summary collapse
Instance Attribute Details
#expiry_timestamp ⇒ Object
Returns the value of attribute expiry_timestamp.
11 12 13 |
# File 'lib/herdst_worker/configuration/metadata.rb', line 11 def @expiry_timestamp end |
Instance Method Details
#has_expired? ⇒ Boolean
17 18 19 20 21 22 23 |
# File 'lib/herdst_worker/configuration/metadata.rb', line 17 def has_expired? if self..nil? false else Time.now.utc.to_i > self. end end |
#set_expiry(expiry) ⇒ Object
13 14 15 |
# File 'lib/herdst_worker/configuration/metadata.rb', line 13 def set_expiry(expiry) self. = expiry end |