Class: CognitiveVision::ImageFeature::Face

Inherits:
Object
  • Object
show all
Defined in:
lib/cognitive_vision/image_feature/face.rb

Instance Method Summary collapse

Instance Method Details

#keyObject



4
5
6
# File 'lib/cognitive_vision/image_feature/face.rb', line 4

def key
  'faces'
end

#parse(response) ⇒ Object



8
9
10
# File 'lib/cognitive_vision/image_feature/face.rb', line 8

def parse(response)
  response[key].map { |face| CognitiveVision::Face.new(gender: face['gender'], age: face['age']) }
end