Repository URL to install this package:
|
Version:
0.1.1 ▾
|
require File.expand_path('../http_utils/request', __FILE__)
require File.expand_path('../http_utils/response', __FILE__)
require File.expand_path('../http_utils/connection', __FILE__)
require File.expand_path('../configuration', __FILE__)
module ServiceM8
class API
attr_accessor *Configuration::VALID_OPTIONS_KEYS
def initialize(options={})
options = ServiceM8.options.merge(options)
Configuration::VALID_OPTIONS_KEYS.each do |key|
send("#{key}=", options[key])
end
end
def config
conf = {}
Configuration::VALID_OPTIONS_KEYS.each do |key|
conf[key] = send key
end
conf
end
include ServiceM8::HttpUtils::Request
include ServiceM8::HttpUtils::Response
include ServiceM8::HttpUtils::Connection
end
end