Class: UClassifyResponse
- Inherits:
-
HTTParty::Response
- Object
- HTTParty::Response
- UClassifyResponse
- Defined in:
- lib/uclassify_response.rb
Instance Method Summary collapse
-
#initialize(uclassify_response) ⇒ UClassifyResponse
constructor
A new instance of UClassifyResponse.
- #is_valid? ⇒ Boolean
- #response_as_hash ⇒ Object
Constructor Details
#initialize(uclassify_response) ⇒ UClassifyResponse
Returns a new instance of UClassifyResponse.
3 4 5 |
# File 'lib/uclassify_response.rb', line 3 def initialize ( uclassify_response) @uclassify_response = uclassify_response end |
Instance Method Details
#is_valid? ⇒ Boolean
7 8 9 |
# File 'lib/uclassify_response.rb', line 7 def is_valid? @uclassify_response.parsed_response['uclassify']['status']['success'] == "true" end |
#response_as_hash ⇒ Object
11 12 13 |
# File 'lib/uclassify_response.rb', line 11 def response_as_hash @uclassify.parsed_response end |