Class: WordsApi::CustomHeaderAuthenticationCredentials
- Inherits:
-
Object
- Object
- WordsApi::CustomHeaderAuthenticationCredentials
- Defined in:
- lib/words_api/http/auth/custom_header_authentication.rb
Overview
Data class for CustomHeaderAuthenticationCredentials. Data class for CustomHeaderAuthenticationCredentials.
Instance Attribute Summary collapse
-
#x_rapid_api_key ⇒ Object
readonly
Returns the value of attribute x_rapid_api_key.
Instance Method Summary collapse
- #clone_with(x_rapid_api_key: nil) ⇒ Object
-
#initialize(x_rapid_api_key:) ⇒ CustomHeaderAuthenticationCredentials
constructor
A new instance of CustomHeaderAuthenticationCredentials.
Constructor Details
#initialize(x_rapid_api_key:) ⇒ CustomHeaderAuthenticationCredentials
Returns a new instance of CustomHeaderAuthenticationCredentials.
30 31 32 33 34 |
# File 'lib/words_api/http/auth/custom_header_authentication.rb', line 30 def initialize(x_rapid_api_key:) raise ArgumentError, 'x_rapid_api_key cannot be nil' if x_rapid_api_key.nil? @x_rapid_api_key = x_rapid_api_key end |
Instance Attribute Details
#x_rapid_api_key ⇒ Object (readonly)
Returns the value of attribute x_rapid_api_key.
28 29 30 |
# File 'lib/words_api/http/auth/custom_header_authentication.rb', line 28 def x_rapid_api_key @x_rapid_api_key end |
Instance Method Details
#clone_with(x_rapid_api_key: nil) ⇒ Object
36 37 38 39 40 41 42 |
# File 'lib/words_api/http/auth/custom_header_authentication.rb', line 36 def clone_with(x_rapid_api_key: nil) x_rapid_api_key ||= self.x_rapid_api_key CustomHeaderAuthenticationCredentials.new( x_rapid_api_key: x_rapid_api_key ) end |