Class: Clonk::User

Inherits:
Object
  • Object
show all
Defined in:
lib/clonk/user.rb

Overview

Represents a user in SSO.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(user_response) ⇒ User

Returns a new instance of User.



10
11
12
13
# File 'lib/clonk/user.rb', line 10

def initialize(user_response)
  @username = user_response['username']
  @id = user_response['id']
end

Instance Attribute Details

#idObject

Returns the value of attribute id.



7
8
9
# File 'lib/clonk/user.rb', line 7

def id
  @id
end

#usernameObject (readonly)

Returns the value of attribute username.



8
9
10
# File 'lib/clonk/user.rb', line 8

def username
  @username
end