Class: Dcc::Server::Storage::Entry
- Inherits:
-
Struct
- Object
- Struct
- Dcc::Server::Storage::Entry
- Defined in:
- lib/dcc/server/storage/entry.rb
Overview
Value object for a stored DCC entry. Carries the SHA-256 id, XML payload, and expiry timestamp.
Instance Attribute Summary collapse
-
#expires_at ⇒ Object
Returns the value of attribute expires_at.
-
#id ⇒ Object
Returns the value of attribute id.
-
#xml ⇒ Object
Returns the value of attribute xml.
Instance Method Summary collapse
Instance Attribute Details
#expires_at ⇒ Object
Returns the value of attribute expires_at
8 9 10 |
# File 'lib/dcc/server/storage/entry.rb', line 8 def expires_at @expires_at end |
#id ⇒ Object
Returns the value of attribute id
8 9 10 |
# File 'lib/dcc/server/storage/entry.rb', line 8 def id @id end |
#xml ⇒ Object
Returns the value of attribute xml
8 9 10 |
# File 'lib/dcc/server/storage/entry.rb', line 8 def xml @xml end |
Instance Method Details
#expired? ⇒ Boolean
9 10 11 |
# File 'lib/dcc/server/storage/entry.rb', line 9 def expired? expires_at && Time.now > expires_at end |