Module: ApiAdaptor::Variables
- Defined in:
- lib/api_adaptor/variables.rb
Overview
Environment variable configuration for User-Agent metadata
These variables are used to construct the User-Agent header for HTTP requests, allowing API providers to identify and contact clients if needed.
Class Method Summary collapse
-
.app_contact ⇒ String
Returns the application contact from environment variable.
-
.app_name ⇒ String
Returns the application name from environment variable.
-
.app_version ⇒ String
Returns the application version from environment variable.
Class Method Details
.app_contact ⇒ String
Returns the application contact from environment variable
Should be an email address or URL where API providers can reach you.
50 51 52 |
# File 'lib/api_adaptor/variables.rb', line 50 def self.app_contact ENV["APP_CONTACT"] || "Contact not stated" end |
.app_name ⇒ String
Returns the application name from environment variable
26 27 28 |
# File 'lib/api_adaptor/variables.rb', line 26 def self.app_name ENV["APP_NAME"] || "Ruby ApiAdaptor App" end |
.app_version ⇒ String
Returns the application version from environment variable
37 38 39 |
# File 'lib/api_adaptor/variables.rb', line 37 def self.app_version ENV["APP_VERSION"] || "Version not stated" end |