Class: Lightrail::Ping

Inherits:
LightrailObject show all
Defined in:
lib/lightrail_client/ping.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Methods inherited from LightrailObject

#initialize

Constructor Details

This class inherits a constructor from Lightrail::LightrailObject

Instance Attribute Details

#effectiveScopesObject

Returns the value of attribute effectiveScopes.



3
4
5
# File 'lib/lightrail_client/ping.rb', line 3

def effectiveScopes
  @effectiveScopes
end

#modeObject

Returns the value of attribute mode.



3
4
5
# File 'lib/lightrail_client/ping.rb', line 3

def mode
  @mode
end

#rolesObject

Returns the value of attribute roles.



3
4
5
# File 'lib/lightrail_client/ping.rb', line 3

def roles
  @roles
end

#scopesObject

Returns the value of attribute scopes.



3
4
5
# File 'lib/lightrail_client/ping.rb', line 3

def scopes
  @scopes
end

#usernameObject

Returns the value of attribute username.



3
4
5
# File 'lib/lightrail_client/ping.rb', line 3

def username
  @username
end

Class Method Details

.pingObject



5
6
7
8
9
# File 'lib/lightrail_client/ping.rb', line 5

def self.ping
  response = Lightrail::Connection.ping
  Lightrail::Validator.validate_ping_response!(response)
  self.new(response['user'])
end