Class: FaceCrop::Detector::Cache

Inherits:
Object
  • Object
show all
Defined in:
lib/face_crop.rb

Constant Summary collapse

@@cache =
{}

Class Method Summary collapse

Class Method Details

.[](key) ⇒ Object



42
43
44
# File 'lib/face_crop.rb', line 42

def self.[](key)
  @@cache[key]
end

.[]=(key, faces) ⇒ Object



38
39
40
# File 'lib/face_crop.rb', line 38

def self.[]=(key, faces)
  @@cache[key] = faces
end

.clearObject



46
47
48
# File 'lib/face_crop.rb', line 46

def self.clear
  @@cache = {}
end