Class: Spage::Config
- Inherits:
-
Object
- Object
- Spage::Config
- Defined in:
- lib/spage/config.rb
Overview
Global Configuration for the Spage Client
Instance Method Summary collapse
- #api_key(api_key = nil) ⇒ Object
- #api_version(api_version = nil) ⇒ Object
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
7 8 9 10 11 |
# File 'lib/spage/config.rb', line 7 def initialize @api_endpoint = 'https://api.statuspage.io' @api_version = 'v1' @api_key = nil end |
Instance Method Details
#api_key(api_key = nil) ⇒ Object
13 14 15 |
# File 'lib/spage/config.rb', line 13 def api_key(api_key = nil) (api_key && @api_key = api_key) || @api_key end |
#api_version(api_version = nil) ⇒ Object
17 18 19 |
# File 'lib/spage/config.rb', line 17 def api_version(api_version = nil) (api_version && @api_version = api_version) || @api_version end |