Class: Apress::Api::CallbackPolicy
- Inherits:
-
Object
- Object
- Apress::Api::CallbackPolicy
- Defined in:
- app/policies/apress/api/callback_policy.rb
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
Instance Method Summary collapse
- #create? ⇒ Boolean
-
#initialize(client, _callback) ⇒ CallbackPolicy
constructor
A new instance of CallbackPolicy.
Constructor Details
#initialize(client, _callback) ⇒ CallbackPolicy
Returns a new instance of CallbackPolicy.
7 8 9 |
# File 'app/policies/apress/api/callback_policy.rb', line 7 def initialize(client, _callback) @client = client end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
5 6 7 |
# File 'app/policies/apress/api/callback_policy.rb', line 5 def client @client end |
Instance Method Details
#create? ⇒ Boolean
11 12 13 |
# File 'app/policies/apress/api/callback_policy.rb', line 11 def create? Apress::Api::Callbacks::Config.allowed_client?(client) end |