Class: MarkingStore::AccessMark

Inherits:
Object
  • Object
show all
Includes:
Comparable
Defined in:
lib/marking_store.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#atimeObject (readonly)

Returns the value of attribute atime.



6
7
8
# File 'lib/marking_store.rb', line 6

def atime
  @atime
end

#keyObject (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

#updateObject



11
12
13
# File 'lib/marking_store.rb', line 11

def update
  @atime = Time.now.to_i
end