Class: Hookdeck::Configuration
- Inherits:
-
Object
- Object
- Hookdeck::Configuration
- Defined in:
- lib/hookdeck/configuration.rb
Constant Summary collapse
- DEFAULTS =
{ api_base: 'https://api.hookdeck.com', api_version: '2024-09-01' }.freeze
Instance Attribute Summary collapse
-
#api_base ⇒ Object
Returns the value of attribute api_base.
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#api_version ⇒ Object
Returns the value of attribute api_version.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
-
#validate! ⇒ Object
Validates the configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
10 11 12 13 14 |
# File 'lib/hookdeck/configuration.rb', line 10 def initialize DEFAULTS.each do |key, value| instance_variable_set("@#{key}", value) end end |
Instance Attribute Details
#api_base ⇒ Object
Returns the value of attribute api_base.
8 9 10 |
# File 'lib/hookdeck/configuration.rb', line 8 def api_base @api_base end |
#api_key ⇒ Object
Returns the value of attribute api_key.
8 9 10 |
# File 'lib/hookdeck/configuration.rb', line 8 def api_key @api_key end |
#api_version ⇒ Object
Returns the value of attribute api_version.
8 9 10 |
# File 'lib/hookdeck/configuration.rb', line 8 def api_version @api_version end |
Instance Method Details
#validate! ⇒ Object
Validates the configuration.
19 20 21 |
# File 'lib/hookdeck/configuration.rb', line 19 def validate! validate_api_version! end |