Class: Jwtauth::User

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attrs) ⇒ User

Returns a new instance of User.



6
7
8
9
10
11
12
13
14
# File 'lib/jwtauth/user.rb', line 6

def initialize attrs
  @id = attrs['id']
  @uid = attrs['uid']
  @role = attrs['role']
  @department_id = attrs['department_id']
  @company_id = attrs['company_id']
  @role_permissions = attrs['role_permissions']
  @departments = attrs['departments']
end

Instance Attribute Details

#company_idObject (readonly)

Returns the value of attribute company_id.



3
4
5
# File 'lib/jwtauth/user.rb', line 3

def company_id
  @company_id
end

#department_idObject (readonly)

Returns the value of attribute department_id.



3
4
5
# File 'lib/jwtauth/user.rb', line 3

def department_id
  @department_id
end

#departmentsObject (readonly)

Returns the value of attribute departments.



4
5
6
# File 'lib/jwtauth/user.rb', line 4

def departments
  @departments
end

#idObject (readonly)

Returns the value of attribute id.



3
4
5
# File 'lib/jwtauth/user.rb', line 3

def id
  @id
end

#roleObject (readonly)

Returns the value of attribute role.



3
4
5
# File 'lib/jwtauth/user.rb', line 3

def role
  @role
end

#role_permissionsObject (readonly)

Returns the value of attribute role_permissions.



4
5
6
# File 'lib/jwtauth/user.rb', line 4

def role_permissions
  @role_permissions
end

#uidObject (readonly)

Returns the value of attribute uid.



3
4
5
# File 'lib/jwtauth/user.rb', line 3

def uid
  @uid
end