lib/gibbon/api.rb in gibbon-0.5.0 vs lib/gibbon/api.rb in gibbon-1.0.0

- old
+ new

@@ -6,11 +6,11 @@ @api_key = api_key || self.class.api_key || ENV['MAILCHIMP_API_KEY'] @api_key = @api_key.strip if @api_key @api_endpoint = default_parameters.delete(:api_endpoint) || self.class.api_endpoint @timeout = default_parameters.delete(:timeout) || self.class.timeout - @throws_exceptions = default_parameters.delete(:throws_exceptions) || self.class.throws_exceptions + @throws_exceptions = default_parameters.has_key?(:throws_exceptions) ? default_parameters.delete(:throws_exceptions) : self.class.throws_exceptions @default_params = {apikey: @api_key}.merge(default_parameters) end def get_exporter @@ -29,6 +29,6 @@ def method_missing(sym, *args, &block) new(self.api_key, {api_endpoint: self.api_endpoint, timeout: self.timeout, throws_exceptions: self.throws_exceptions}).send(sym, *args, &block) end end end -end \ No newline at end of file +end