Class: HybiscusPdfReport::Config
- Inherits:
-
Object
- Object
- HybiscusPdfReport::Config
- Defined in:
- lib/hybiscus_pdf_report/config.rb
Overview
Configuration class for the Hybiscus PDF Report gem.
This class manages all configuration settings including API credentials, URLs, timeouts, and connection adapters. Configuration can be set through environment variables or programmatically.
Constant Summary collapse
- DEFAULT_API_URL =
"https://api.hybiscus.dev/api/v1/"- DEFAULT_TIMEOUT =
10
Instance Attribute Summary collapse
-
#adapter ⇒ Object
Returns the value of attribute adapter.
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#api_url ⇒ Object
Returns the value of attribute api_url.
-
#stubs ⇒ Object
Returns the value of attribute stubs.
-
#timeout ⇒ Object
Returns the value of attribute timeout.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
29 30 31 32 33 34 35 |
# File 'lib/hybiscus_pdf_report/config.rb', line 29 def initialize @api_key = ENV["HYBISCUS_API_KEY"] @api_url = ENV["HYBISCUS_API_URL"] || DEFAULT_API_URL @timeout = DEFAULT_TIMEOUT @adapter = Faraday.default_adapter @stubs = nil end |
Instance Attribute Details
#adapter ⇒ Object
Returns the value of attribute adapter.
24 25 26 |
# File 'lib/hybiscus_pdf_report/config.rb', line 24 def adapter @adapter end |
#api_key ⇒ Object
Returns the value of attribute api_key.
24 25 26 |
# File 'lib/hybiscus_pdf_report/config.rb', line 24 def api_key @api_key end |
#api_url ⇒ Object
Returns the value of attribute api_url.
24 25 26 |
# File 'lib/hybiscus_pdf_report/config.rb', line 24 def api_url @api_url end |
#stubs ⇒ Object
Returns the value of attribute stubs.
24 25 26 |
# File 'lib/hybiscus_pdf_report/config.rb', line 24 def stubs @stubs end |
#timeout ⇒ Object
Returns the value of attribute timeout.
24 25 26 |
# File 'lib/hybiscus_pdf_report/config.rb', line 24 def timeout @timeout end |