Class: Rbac::User
- Inherits:
-
Object
- Object
- Rbac::User
- Defined in:
- lib/rbac/user.rb
Overview
Class Rbac::User describes authorized user and stores its attributes required for RBAC filtration
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
-
#role ⇒ Object
readonly
Returns the value of attribute role.
Instance Method Summary collapse
-
#initialize(role:, **attrs) ⇒ User
constructor
A new instance of User.
Constructor Details
#initialize(role:, **attrs) ⇒ User
Returns a new instance of User.
13 14 15 16 |
# File 'lib/rbac/user.rb', line 13 def initialize(role:, **attrs) @role = role @attributes = attrs.stringify_keys end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
9 10 11 |
# File 'lib/rbac/user.rb', line 9 def attributes @attributes end |
#role ⇒ Object (readonly)
Returns the value of attribute role.
9 10 11 |
# File 'lib/rbac/user.rb', line 9 def role @role end |