lib/ecircle.rb in ecircle-0.0.7 vs lib/ecircle.rb in ecircle-0.0.8

- old
+ new

@@ -8,11 +8,11 @@ # projects Gemfile, not ecircle's one. Not sure if there is a solution for this problem, but I'd # rather do requires via bundler instead of explicit requires. dir = File.dirname(__FILE__) -%w!version configuration client helper job_package!.each do |file| +%w!api version configuration helper job_package wrapped_response!.each do |file| require File.join(dir, 'ecircle', file) end module Ecircle class << self @@ -21,21 +21,21 @@ def configuration @configuration ||= Configuration.new end #@private - def client - @client ||= Client.new + def api + @api ||= Api.new end #@private def configure &block block.call configuration end end - (Ecircle::Client.instance_methods(false) - [:client]).each do |meth| + (Ecircle::Api.instance_methods(false) - [:client]).each do |meth| define_singleton_method meth do |*args| - client.send meth, *args + api.send meth, *args end end end