Class: UClassifyResponse

Inherits:
HTTParty::Response
  • Object
show all
Defined in:
lib/uclassify_response.rb

Instance Method Summary collapse

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

Returns:

  • (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_hashObject



11
12
13
# File 'lib/uclassify_response.rb', line 11

def response_as_hash
  @uclassify.parsed_response
end