lib/itunes.rb in itunes-0.4.1 vs lib/itunes.rb in itunes-0.5.0

- old
+ new

@@ -1,7 +1,6 @@ require 'faraday_middleware' -require 'faraday/rashify' require 'itunes/configuration' require 'itunes/client' module ITunes extend Configuration @@ -11,16 +10,22 @@ # @return [ITunes::Client] def self.client(options={}) ITunes::Client.new(options) end + # Alias for ITunes::Client.new + # + # @return [ITunes::Client] + def self.new(options={}) + ITunes::Client.new(options) + end + # Delegate to ITunes::Client def self.method_missing(method, *args, &block) - return super unless client.respond_to?(method) - client.send(method, *args, &block) + return super unless new.respond_to?(method) + new.send(method, *args, &block) end - # Delegate to ITunes::Client - def self.respond_to?(method) - return client.respond_to?(method) || super + def self.respond_to?(method, include_private = false) + new.respond_to?(method, include_private) || super(method, include_private) end end