Class: Rbacan::AuthorizationRequest
- Inherits:
-
Object
- Object
- Rbacan::AuthorizationRequest
- Defined in:
- lib/rbacan/host_authorization.rb
Instance Attribute Summary collapse
-
#context ⇒ Object
readonly
Returns the value of attribute context.
-
#permission ⇒ Object
readonly
Returns the value of attribute permission.
-
#role ⇒ Object
readonly
Returns the value of attribute role.
-
#user ⇒ Object
readonly
Returns the value of attribute user.
Instance Method Summary collapse
-
#initialize(user:, permission:, role:, context:) ⇒ AuthorizationRequest
constructor
A new instance of AuthorizationRequest.
Constructor Details
#initialize(user:, permission:, role:, context:) ⇒ AuthorizationRequest
Returns a new instance of AuthorizationRequest.
75 76 77 78 79 80 81 |
# File 'lib/rbacan/host_authorization.rb', line 75 def initialize(user:, permission:, role:, context:) @user = user = &.to_s&.dup&.freeze @role = role&.to_s&.dup&.freeze @context = context freeze end |
Instance Attribute Details
#context ⇒ Object (readonly)
Returns the value of attribute context.
73 74 75 |
# File 'lib/rbacan/host_authorization.rb', line 73 def context @context end |
#permission ⇒ Object (readonly)
Returns the value of attribute permission.
73 74 75 |
# File 'lib/rbacan/host_authorization.rb', line 73 def end |
#role ⇒ Object (readonly)
Returns the value of attribute role.
73 74 75 |
# File 'lib/rbacan/host_authorization.rb', line 73 def role @role end |
#user ⇒ Object (readonly)
Returns the value of attribute user.
73 74 75 |
# File 'lib/rbacan/host_authorization.rb', line 73 def user @user end |