Class: MarkingStore::AccessMark
- Inherits:
-
Object
- Object
- MarkingStore::AccessMark
- Includes:
- Comparable
- Defined in:
- lib/marking_store.rb
Instance Attribute Summary collapse
-
#atime ⇒ Object
readonly
Returns the value of attribute atime.
-
#key ⇒ Object
readonly
Returns the value of attribute key.
Instance Method Summary collapse
- #<=>(other) ⇒ Object
-
#initialize(key) ⇒ AccessMark
constructor
A new instance of AccessMark.
- #update ⇒ Object
Constructor Details
#initialize(key) ⇒ AccessMark
Returns a new instance of AccessMark.
7 8 9 |
# File 'lib/marking_store.rb', line 7 def initialize(key) @key = key; update end |
Instance Attribute Details
#atime ⇒ Object (readonly)
Returns the value of attribute atime.
6 7 8 |
# File 'lib/marking_store.rb', line 6 def atime @atime end |
#key ⇒ Object (readonly)
Returns the value of attribute key.
6 7 8 |
# File 'lib/marking_store.rb', line 6 def key @key end |
Instance Method Details
#<=>(other) ⇒ Object
15 16 17 |
# File 'lib/marking_store.rb', line 15 def <=>(other) @atime <=> other.atime end |
#update ⇒ Object
11 12 13 |
# File 'lib/marking_store.rb', line 11 def update @atime = Time.now.to_i end |