class MoonropeClient::Response
Public Class Methods
new(request, data)
click to toggle source
Initialize a new response object
@param request [MoonropeClient::Request] @param data [Hash]
# File lib/moonrope_client/response.rb, line 10 def initialize(request, data) @request = request @data = data end
Public Instance Methods
data()
click to toggle source
@return [Object] the data returned by the server
# File lib/moonrope_client/response.rb, line 40 def data @data['data'] end
exception_message()
click to toggle source
@return [Strig] the string for representing this response in an exception
# File lib/moonrope_client/response.rb, line 54 def exception_message self.data end
flags()
click to toggle source
@return [Hash] any flags returned by the server
# File lib/moonrope_client/response.rb, line 33 def flags @data['flags'] end
status()
click to toggle source
@return [String] the status of the request returned by the server
# File lib/moonrope_client/response.rb, line 27 def status @data['status'] end
success?()
click to toggle source
Is this a successful response?
@return [Boolean]
# File lib/moonrope_client/response.rb, line 20 def success? false end
time()
click to toggle source
@return [Float] the time the request took at the server
# File lib/moonrope_client/response.rb, line 47 def time @data['time'] end