Class: Apill::Authorizers::Query
- Inherits:
-
Object
- Object
- Apill::Authorizers::Query
- Defined in:
- lib/apill/authorizers/query.rb
Instance Attribute Summary collapse
-
#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:, resource:, **other) ⇒ Query
constructor
A new instance of Query.
Constructor Details
#initialize(token:, user:, resource:, **other) ⇒ Query
Returns a new instance of Query.
8 9 10 11 12 13 14 15 16 |
# File 'lib/apill/authorizers/query.rb', line 8 def initialize(token:, user:, resource:, **other) self.token = token self.user = user self.resource = resource other.each do |name, value| public_send("#{name}=", value) end end |
Instance Attribute Details
#resource ⇒ Object
Returns the value of attribute resource.
4 5 6 |
# File 'lib/apill/authorizers/query.rb', line 4 def resource @resource end |
#token ⇒ Object
Returns the value of attribute token.
4 5 6 |
# File 'lib/apill/authorizers/query.rb', line 4 def token @token end |
#user ⇒ Object
Returns the value of attribute user.
4 5 6 |
# File 'lib/apill/authorizers/query.rb', line 4 def user @user end |
Instance Method Details
#able_to_create? ⇒ Boolean
26 27 28 |
# File 'lib/apill/authorizers/query.rb', line 26 def able_to_create? false end |
#able_to_destroy? ⇒ Boolean
34 35 36 |
# File 'lib/apill/authorizers/query.rb', line 34 def able_to_destroy? false end |
#able_to_index? ⇒ Boolean
18 19 20 |
# File 'lib/apill/authorizers/query.rb', line 18 def able_to_index? true end |
#able_to_show? ⇒ Boolean
22 23 24 |
# File 'lib/apill/authorizers/query.rb', line 22 def able_to_show? false end |
#able_to_update? ⇒ Boolean
30 31 32 |
# File 'lib/apill/authorizers/query.rb', line 30 def able_to_update? false end |