Class: SynCache::Placeholder
- Inherits:
-
Object
- Object
- SynCache::Placeholder
- Defined in:
- lib/syncache/remote.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#timestamp ⇒ Object
readonly
Returns the value of attribute timestamp.
Instance Method Summary collapse
- #===(other) ⇒ Object
-
#initialize ⇒ Placeholder
constructor
A new instance of Placeholder.
Constructor Details
#initialize ⇒ Placeholder
Returns a new instance of Placeholder.
21 22 23 24 |
# File 'lib/syncache/remote.rb', line 21 def initialize @id = rand(9223372036854775808) @timestamp = Time.now end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
26 27 28 |
# File 'lib/syncache/remote.rb', line 26 def id @id end |
#timestamp ⇒ Object (readonly)
Returns the value of attribute timestamp.
26 27 28 |
# File 'lib/syncache/remote.rb', line 26 def @timestamp end |
Instance Method Details
#===(other) ⇒ Object
28 29 30 |
# File 'lib/syncache/remote.rb', line 28 def ===(other) other.kind_of?(Placeholder) and other.id == @id end |