lib/tito/request_proxy.rb in tito-0.2.0 vs lib/tito/request_proxy.rb in tito-0.2.1

- old
+ new

@@ -8,11 +8,12 @@ @proxy_path = proxy_path @proxy_class = proxy_class @api_key = api_key end - def all - proxy_class.all(path_prefix: proxy_path, api_key: api_key) + def all(attrs = {}) + _api_key = attrs.delete(:api_key) || api_key + proxy_class.all(path_prefix: proxy_path, api_key: _api_key) end def new(attrs = {}) proxy_class.new(attrs.merge(path_prefix: proxy_path, api_key: api_key)) end \ No newline at end of file