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
- #able_to_show? ⇒ Boolean
- #able_to_update? ⇒ Boolean
-
#initialize(token:, user:, params:, resource:, **other) ⇒ Query
constructor
A new instance of Query.
Constructor Details
#initialize(token:, user:, params:, resource:, **other) ⇒ Query
Returns a new instance of Query.
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/drillbit/authorizers/query.rb', line 10 def initialize(token:, user:, 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
29 30 31 |
# File 'lib/drillbit/authorizers/query.rb', line 29 def able_to_create? false end |
#able_to_destroy? ⇒ Boolean
37 38 39 |
# File 'lib/drillbit/authorizers/query.rb', line 37 def able_to_destroy? false end |
#able_to_index? ⇒ Boolean
21 22 23 |
# File 'lib/drillbit/authorizers/query.rb', line 21 def able_to_index? false end |
#able_to_show? ⇒ Boolean
25 26 27 |
# File 'lib/drillbit/authorizers/query.rb', line 25 def able_to_show? false end |
#able_to_update? ⇒ Boolean
33 34 35 |
# File 'lib/drillbit/authorizers/query.rb', line 33 def able_to_update? false end |