lib/cloudally/api.rb in cloudally-0.1.0 vs lib/cloudally/api.rb in cloudally-0.1.1

- old
+ new

@@ -1,32 +1,31 @@ -require File.expand_path('../connection', __FILE__) -require File.expand_path('../request', __FILE__) -require File.expand_path('../authentication', __FILE__) - - -module CloudAlly - # @private - class API - # @private - attr_accessor *Configuration::VALID_OPTIONS_KEYS - - # Creates a new API - def initialize(options={}) - options = CloudAlly.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 Connection - include Request - include Authentication - end -end +require File.expand_path('connection', __dir__) +require File.expand_path('request', __dir__) +require File.expand_path('authentication', __dir__) + +module CloudAlly + # @private + class API + # @private + attr_accessor *Configuration::VALID_OPTIONS_KEYS + + # Creates a new API + def initialize(options = {}) + options = CloudAlly.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 Connection + include Request + include Authentication + end +end