Module: UploadCache::WeakReference

Defined in:
lib/upload_cache.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#upload_cache_object_idObject

Returns the value of attribute upload_cache_object_id.



389
390
391
# File 'lib/upload_cache.rb', line 389

def upload_cache_object_id
  @upload_cache_object_id
end

Instance Method Details

#upload_cacheObject



391
392
393
394
395
396
397
# File 'lib/upload_cache.rb', line 391

def upload_cache
  begin
    ObjectSpace._id2ref(upload_cache_object_id)
  rescue Object
    nil
  end
end

#upload_cache=(upload_cache) ⇒ Object



399
400
401
# File 'lib/upload_cache.rb', line 399

def upload_cache=(upload_cache)
  self.upload_cache_object_id = upload_cache.object_id
end