Class: CognitiveVision::ImageFeature::Adult
- Inherits:
-
Object
- Object
- CognitiveVision::ImageFeature::Adult
- Defined in:
- lib/cognitive_vision/image_feature/adult.rb
Instance Method Summary collapse
Instance Method Details
#key ⇒ Object
4 5 6 |
# File 'lib/cognitive_vision/image_feature/adult.rb', line 4 def key 'adult' end |
#parse(response) ⇒ Object
8 9 10 11 12 13 |
# File 'lib/cognitive_vision/image_feature/adult.rb', line 8 def parse(response) adult_response = response[key] CognitiveVision::Adult.new(adult_content: adult_response['isAdultContent'], adult_score: adult_response['adultScore'], racy_score: adult_response['racyScore'], racy_content: adult_response['isRacyContent']) end |