class Tolq::Api::Response

Wraps the responses of the Tolq Api

Attributes

body[R]
status[R]

Public Class Methods

new(status:, body:) click to toggle source
# File lib/tolq-api/response.rb, line 7
def initialize(status:, body:)
  raise ArgumentError.new('Expected body to be a string') unless !body || body.is_a?(String)

  @status = status.to_i
  @body = body
end

Public Instance Methods

==(other) click to toggle source
# File lib/tolq-api/response.rb, line 14
def ==(other)
  self.status == other.status && self.body == other.body
end