Class: DaisybillApi::Configuration
- Inherits:
-
Object
- Object
- DaisybillApi::Configuration
- Defined in:
- lib/daisybill_api/configuration.rb
Instance Attribute Summary collapse
-
#api_token ⇒ String
Sets and gets the API Token.
-
#host ⇒ String
Sets and gets the host.
- #logger ⇒ Object
-
#port ⇒ Integer
Sets and gets the port.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
36 37 38 39 |
# File 'lib/daisybill_api/configuration.rb', line 36 def initialize @port = 443 @host = "go.daisybill.com" end |
Instance Attribute Details
#api_token ⇒ String
Sets and gets the API Token
DaisybillApi.configuration.api_token # => "987654321zyxwvu"
DaisybillApi.configuration.api_token = "123456789abcdef" # => "123456789abcdef"
DaisybillApi.configuration.api_token # => "123456789abcdef"
13 14 15 |
# File 'lib/daisybill_api/configuration.rb', line 13 def api_token @api_token end |
#host ⇒ String
Sets and gets the host
DaisybillApi.configuration.host # => "go.daisybill.com"
DaisybillApi.configuration.host = "localhost" # => "localhost"
DaisybillApi.configuration.host # => "localhost"
22 23 24 |
# File 'lib/daisybill_api/configuration.rb', line 22 def host @host end |
#logger ⇒ Object
42 43 44 |
# File 'lib/daisybill_api/configuration.rb', line 42 def logger @logger ||= Logger.new nil end |
#port ⇒ Integer
Sets and gets the port
DaisybillApi.configuration.port # => 443
DaisybillApi.configuration.port = 3000 # => 3000
DaisybillApi.configuration.port # => 3000
31 32 33 |
# File 'lib/daisybill_api/configuration.rb', line 31 def port @port end |