class TinyGate::Types::SessionResponse
Attributes
body[R]
response[R]
Public Class Methods
new(response)
click to toggle source
# File lib/tiny_gate/types/session_response.rb, line 9 def initialize(response) @response = response @body = JSON.parse(response.body) end
Public Instance Methods
global_user()
click to toggle source
# File lib/tiny_gate/types/session_response.rb, line 18 def global_user Types::User[body] end
success?()
click to toggle source
# File lib/tiny_gate/types/session_response.rb, line 14 def success? response.status == 200 end