Class: Drillbit::Authorizers::Scope
- Inherits:
-
Object
- Object
- Drillbit::Authorizers::Scope
- Defined in:
- lib/drillbit/authorizers/scope.rb
Instance Attribute Summary collapse
-
#params ⇒ Object
Returns the value of attribute params.
-
#scope_root ⇒ Object
Returns the value of attribute scope_root.
-
#scoped_user_id ⇒ Object
Returns the value of attribute scoped_user_id.
-
#token ⇒ Object
Returns the value of attribute token.
-
#user ⇒ Object
Returns the value of attribute user.
Instance Method Summary collapse
-
#call ⇒ Object
rubocop:enable Metrics/ParameterLists.
-
#initialize(token:, user:, params:, scoped_user_id:, scope_root:, **other) ⇒ Scope
constructor
rubocop:disable Metrics/ParameterLists.
Constructor Details
#initialize(token:, user:, params:, scoped_user_id:, scope_root:, **other) ⇒ Scope
rubocop:disable Metrics/ParameterLists
12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/drillbit/authorizers/scope.rb', line 12 def initialize(token:, user:, params:, scoped_user_id:, scope_root:, **other) self.token = token self.user = user self.params = params self.scoped_user_id = scoped_user_id self.scope_root = scope_root other.each do |name, value| public_send("#{name}=", value) end end |
Instance Attribute Details
#params ⇒ Object
Returns the value of attribute params.
5 6 7 |
# File 'lib/drillbit/authorizers/scope.rb', line 5 def params @params end |
#scope_root ⇒ Object
Returns the value of attribute scope_root.
5 6 7 |
# File 'lib/drillbit/authorizers/scope.rb', line 5 def scope_root @scope_root end |
#scoped_user_id ⇒ Object
Returns the value of attribute scoped_user_id.
5 6 7 |
# File 'lib/drillbit/authorizers/scope.rb', line 5 def scoped_user_id @scoped_user_id end |
#token ⇒ Object
Returns the value of attribute token.
5 6 7 |
# File 'lib/drillbit/authorizers/scope.rb', line 5 def token @token end |
#user ⇒ Object
Returns the value of attribute user.
5 6 7 |
# File 'lib/drillbit/authorizers/scope.rb', line 5 def user @user end |
Instance Method Details
#call ⇒ Object
rubocop:enable Metrics/ParameterLists
25 26 27 |
# File 'lib/drillbit/authorizers/scope.rb', line 25 def call scope_root.none end |