module TicketingHub::Configuration

Constants

DEFAULT_ADAPTER
DEFAULT_API_ENDPOINT
DEFAULT_USER_AGENT
VALID_OPTIONS_KEYS

Public Class Methods

extended(base) click to toggle source
# File lib/ticketing_hub/configuration.rb, line 26
def self.extended base
  base.reset
end

Public Instance Methods

api_endpoint=(value) click to toggle source
# File lib/ticketing_hub/configuration.rb, line 40
def api_endpoint= value
  @api_endpoint = File.join value, ''
end
configure() { |self| ... } click to toggle source
# File lib/ticketing_hub/configuration.rb, line 30
def configure
  yield self
end
faraday_config(&block) click to toggle source
# File lib/ticketing_hub/configuration.rb, line 44
def faraday_config &block
  @faraday_config_block = block
end
options() click to toggle source
# File lib/ticketing_hub/configuration.rb, line 34
def options
  VALID_OPTIONS_KEYS.each_with_object Hash.new do |key, memo|
    memo[key] = send key
  end
end
reset() click to toggle source
# File lib/ticketing_hub/configuration.rb, line 48
def reset
  self.adapter        = DEFAULT_ADAPTER
  self.api_endpoint   = DEFAULT_API_ENDPOINT
  self.client_id      = nil
  self.client_secret  = nil
  self.access_token   = nil
  self.refresh_token  = nil
  self.proxy          = nil
  self.request_host   = nil
  self.user_agent     = DEFAULT_USER_AGENT
end