Class: CopyAi::Authenticator
- Inherits:
-
Object
- Object
- CopyAi::Authenticator
- Defined in:
- lib/copy_ai/authenticator.rb
Constant Summary collapse
- AUTHENTICATION_HEADER =
"x-copy-ai-api-key".freeze
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
Instance Method Summary collapse
- #header ⇒ Object
-
#initialize(api_key:) ⇒ Authenticator
constructor
A new instance of Authenticator.
Constructor Details
permalink #initialize(api_key:) ⇒ Authenticator
Returns a new instance of Authenticator.
7 8 9 |
# File 'lib/copy_ai/authenticator.rb', line 7 def initialize(api_key:) @api_key = api_key end |
Instance Attribute Details
permalink #api_key ⇒ Object
Returns the value of attribute api_key.
5 6 7 |
# File 'lib/copy_ai/authenticator.rb', line 5 def api_key @api_key end |
Instance Method Details
permalink #header ⇒ Object
[View source]
11 12 13 |
# File 'lib/copy_ai/authenticator.rb', line 11 def header {AUTHENTICATION_HEADER => api_key} end |