module DaisybillApi
Constants
- ROOT
@private
- VERSION
Attributes
configuration[W]
Public Class Methods
configuration()
click to toggle source
Returns the current configuration
DaisybillApi.configuration # => #<DaisybillApi::Configuration:0x007fbf85e64e88 @host="go.daisybill.com", @port=443>
@return [DaisybillApi::Configuration]
# File lib/daisybill_api.rb, line 20 def configuration @configuration ||= DaisybillApi::Configuration.new end
configure() { |configuration| ... }
click to toggle source
Allows configuration with a block
DaisybillApi.configure do |config| config.host = "localhost" config.port = 3000 config.api_token = "123abc" end
# File lib/daisybill_api.rb, line 31 def configure yield configuration end
logger()
click to toggle source
@private
# File lib/daisybill_api.rb, line 49 def logger configuration.logger end
reset_configuration()
click to toggle source
Resets the configuration
DaisybillApi.configuration.host = "localhost" # => "localhost" DaisybillApi.configuration.port = 3000 # => 3000 DaisybillApi.reset_configuration # => nil DaisybillApi.configuration.host # => "go.daisybill.com"
@return [nil]
# File lib/daisybill_api.rb, line 44 def reset_configuration @configuration = nil end