Class: Apress::Api::CallbackPolicy

Inherits:
Object
  • Object
show all
Defined in:
app/policies/apress/api/callback_policy.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#clientObject (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

Returns:

  • (Boolean)


11
12
13
# File 'app/policies/apress/api/callback_policy.rb', line 11

def create?
  Apress::Api::Callbacks::Config.allowed_client?(client)
end