Class: Spage::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/spage/config.rb

Overview

Global Configuration for the Spage Client

Instance Method Summary collapse

Constructor Details

#initializeConfig

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