Class: Drillbit::Authorizers::Query
- Inherits:
-
Object
- Object
- Drillbit::Authorizers::Query
- Defined in:
- lib/drillbit/authorizers/query.rb
Instance Attribute Summary collapse
-
#params ⇒ Object
Returns the value of attribute params.
-
#resource ⇒ Object
Returns the value of attribute resource.
-
#token ⇒ Object
Returns the value of attribute token.
-
#user ⇒ Object
Returns the value of attribute user.
Instance Method Summary collapse
- #able_to_create? ⇒ Boolean
- #able_to_destroy? ⇒ Boolean
-
#able_to_index? ⇒ Boolean
rubocop:enable Metrics/ParameterLists.
- #able_to_show? ⇒ Boolean
- #able_to_update? ⇒ Boolean
-
#initialize(token:, user:, issuer:, params:, resource:, **other) ⇒ Query
constructor
rubocop:disable Metrics/ParameterLists.
Constructor Details
#initialize(token:, user:, issuer:, params:, resource:, **other) ⇒ Query
rubocop:disable Metrics/ParameterLists
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/drillbit/authorizers/query.rb', line 11 def initialize(token:, user:, issuer:, params:, resource:, **other) self.token = token self.user = user self.params = params self.resource = resource 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/query.rb', line 5 def params @params end |
#resource ⇒ Object
Returns the value of attribute resource.
5 6 7 |
# File 'lib/drillbit/authorizers/query.rb', line 5 def resource @resource end |
#token ⇒ Object
Returns the value of attribute token.
5 6 7 |
# File 'lib/drillbit/authorizers/query.rb', line 5 def token @token end |
#user ⇒ Object
Returns the value of attribute user.
5 6 7 |
# File 'lib/drillbit/authorizers/query.rb', line 5 def user @user end |
Instance Method Details
#able_to_create? ⇒ Boolean
31 32 33 |
# File 'lib/drillbit/authorizers/query.rb', line 31 def able_to_create? false end |
#able_to_destroy? ⇒ Boolean
39 40 41 |
# File 'lib/drillbit/authorizers/query.rb', line 39 def able_to_destroy? false end |
#able_to_index? ⇒ Boolean
rubocop:enable Metrics/ParameterLists
23 24 25 |
# File 'lib/drillbit/authorizers/query.rb', line 23 def able_to_index? false end |
#able_to_show? ⇒ Boolean
27 28 29 |
# File 'lib/drillbit/authorizers/query.rb', line 27 def able_to_show? false end |
#able_to_update? ⇒ Boolean
35 36 37 |
# File 'lib/drillbit/authorizers/query.rb', line 35 def able_to_update? false end |