Class: Jwtauth::User
- Inherits:
-
Object
- Object
- Jwtauth::User
- Defined in:
- lib/jwtauth/user.rb
Instance Attribute Summary collapse
-
#company_id ⇒ Object
readonly
Returns the value of attribute company_id.
-
#department_id ⇒ Object
readonly
Returns the value of attribute department_id.
-
#departments ⇒ Object
readonly
Returns the value of attribute departments.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#role ⇒ Object
readonly
Returns the value of attribute role.
-
#role_permissions ⇒ Object
readonly
Returns the value of attribute role_permissions.
-
#uid ⇒ Object
readonly
Returns the value of attribute uid.
Instance Method Summary collapse
-
#initialize(attrs) ⇒ User
constructor
A new instance of User.
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_id ⇒ Object (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_id ⇒ Object (readonly)
Returns the value of attribute department_id.
3 4 5 |
# File 'lib/jwtauth/user.rb', line 3 def department_id @department_id end |
#departments ⇒ Object (readonly)
Returns the value of attribute departments.
4 5 6 |
# File 'lib/jwtauth/user.rb', line 4 def departments @departments end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
3 4 5 |
# File 'lib/jwtauth/user.rb', line 3 def id @id end |
#role ⇒ Object (readonly)
Returns the value of attribute role.
3 4 5 |
# File 'lib/jwtauth/user.rb', line 3 def role @role end |
#role_permissions ⇒ Object (readonly)
Returns the value of attribute role_permissions.
4 5 6 |
# File 'lib/jwtauth/user.rb', line 4 def @role_permissions end |
#uid ⇒ Object (readonly)
Returns the value of attribute uid.
3 4 5 |
# File 'lib/jwtauth/user.rb', line 3 def uid @uid end |