Class: FaceDetect

Inherits:
Object
  • Object
show all
Defined in:
lib/face_detect.rb,
lib/face_detect/face.rb,
lib/face_detect/version.rb,
lib/face_detect/landmark.rb,
lib/face_detect/adapter/google.rb,
lib/face_detect/adapter/google/service.rb,
lib/face_detect/adapter/google/auth_helper.rb

Defined Under Namespace

Modules: Adapter Classes: Face, Landmark

Constant Summary collapse

VERSION =
'0.1.1'

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(file:, adapter:) ⇒ FaceDetect

TODO accept a File or a URL



7
8
9
10
# File 'lib/face_detect.rb', line 7

def initialize(file:, adapter:)
  @file = file
  @adapter_instance = adapter.new(file)
end

Instance Attribute Details

#adapter_instanceObject (readonly)

Returns the value of attribute adapter_instance.



4
5
6
# File 'lib/face_detect.rb', line 4

def adapter_instance
  @adapter_instance
end

#fileObject (readonly)

Returns the value of attribute file.



4
5
6
# File 'lib/face_detect.rb', line 4

def file
  @file
end

Instance Method Details

#runObject



12
13
14
# File 'lib/face_detect.rb', line 12

def run
  adapter_instance.run
end