Class: Telleroo::Configuration

Inherits:
Object
  • Object
show all
Includes:
ActiveSupport::Configurable
Defined in:
lib/telleroo/configuration.rb

Overview

Configuration.

Allows this: Telleroo.configure do |config|

config.authorization_token = 'deadbeef'
config.endpoint = 'https://sandbox.telleroo.com'
config.http_adapter = :typhoeus

end

Constant Summary collapse

VALID_CONFIG_KEYS =
[:authorization_token, :endpoint, :http_adapter].freeze

Instance Method Summary collapse

Instance Method Details

#optionsObject

Return the configuration values set in this module



29
30
31
32
33
# File 'lib/telleroo/configuration.rb', line 29

def options
  Hash[
    *Configuration::VALID_CONFIG_KEYS.map { |key| [key, send(key)] }.flatten
  ]
end