Class: PusherPlatform::AuthenticationResponse
- Inherits:
-
Object
- Object
- PusherPlatform::AuthenticationResponse
- Defined in:
- lib/pusher-platform/authentication_response.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#headers ⇒ Object
readonly
Returns the value of attribute headers.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
- #as_json(options = {}) ⇒ Object
-
#initialize(options) ⇒ AuthenticationResponse
constructor
A new instance of AuthenticationResponse.
- #to_json(*options) ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(options) ⇒ AuthenticationResponse
Returns a new instance of AuthenticationResponse.
5 6 7 8 9 |
# File 'lib/pusher-platform/authentication_response.rb', line 5 def initialize() @status = [:status] @headers = [:headers] || {} @body = [:body] end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
3 4 5 |
# File 'lib/pusher-platform/authentication_response.rb', line 3 def body @body end |
#headers ⇒ Object (readonly)
Returns the value of attribute headers.
3 4 5 |
# File 'lib/pusher-platform/authentication_response.rb', line 3 def headers @headers end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
3 4 5 |
# File 'lib/pusher-platform/authentication_response.rb', line 3 def status @status end |
Instance Method Details
#as_json(options = {}) ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/pusher-platform/authentication_response.rb', line 15 def as_json( = {}) { status: @status, headers: @headers, body: @body } end |
#to_json(*options) ⇒ Object
23 24 25 |
# File 'lib/pusher-platform/authentication_response.rb', line 23 def to_json(*) as_json(*).to_json(*) end |
#to_s ⇒ Object
11 12 13 |
# File 'lib/pusher-platform/authentication_response.rb', line 11 def to_s "PusherPlatform::AuthenticationResponse - status: #{@status} body: #{@body.to_json}" end |