Class: Anorexic::CacheObject

Inherits:
Object
  • Object
show all
Defined in:
lib/anorexic/base/cache.rb

Overview

this class holds cached objects (data and modification times)

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(d = nil, t = Time.now) ⇒ CacheObject

initialize a Cached object


19
20
21
# File 'lib/anorexic/base/cache.rb', line 19

def initialize d = nil, t = Time.now
	@data, @mtime = d, t
end

Instance Attribute Details

#dataObject

Cached attributes


16
17
18
# File 'lib/anorexic/base/cache.rb', line 16

def data
  @data
end

#mtimeObject

Cached attributes


16
17
18
# File 'lib/anorexic/base/cache.rb', line 16

def mtime
  @mtime
end