Class: Lapis::Yggdrasil::Messaging::Response Abstract

Inherits:
Object
  • Object
show all
Defined in:
lib/lapis/yggdrasil/messaging/response.rb

Overview

This class is abstract.

Base class for all response messages received from the server.

Direct Known Subclasses

ErrorResponse, TokenResponse

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#statusFixnum (readonly)

HTTP status code given in the response.

Returns:

  • (Fixnum)

    HTTP status code.



11
12
13
# File 'lib/lapis/yggdrasil/messaging/response.rb', line 11

def status
  @status
end

Instance Method Details

#ok?true, false

Determines whether the result of the request was a success.

Returns:

  • (true)

    The result was a success.

  • (false)

    The result was a failure.



16
17
18
# File 'lib/lapis/yggdrasil/messaging/response.rb', line 16

def ok?
  @is_ok
end