Class: PetstoreApiClient::Authentication::None
- Defined in:
- lib/petstore_api_client/authentication/none.rb
Overview
No authentication strategy (Null Object pattern) Used when no authentication is configured
This allows the authentication system to always have an authenticator without needing nil checks everywhere
Instance Method Summary collapse
-
#apply(_env) ⇒ void
Apply no authentication (does nothing).
-
#configured? ⇒ Boolean
Check if authentication is configured.
-
#inspect ⇒ String
(also: #to_s)
String representation.
Methods inherited from Base
Instance Method Details
#apply(_env) ⇒ void
This method returns an undefined value.
Apply no authentication (does nothing)
22 23 24 |
# File 'lib/petstore_api_client/authentication/none.rb', line 22 def apply(_env) # Intentionally empty - no authentication to apply end |
#configured? ⇒ Boolean
Check if authentication is configured
29 30 31 |
# File 'lib/petstore_api_client/authentication/none.rb', line 29 def configured? false end |
#inspect ⇒ String Also known as: to_s
String representation
36 37 38 |
# File 'lib/petstore_api_client/authentication/none.rb', line 36 def inspect "#<#{self.class.name} (no authentication)>" end |