diff --git a/lib/ghee/resource_proxy.rb b/lib/ghee/resource_proxy.rb index 3289fb2..3d7f136 100644 --- a/lib/ghee/resource_proxy.rb +++ b/lib/ghee/resource_proxy.rb @@ -107,7 +107,7 @@ def paginate(options) parse_link_header response.headers.delete("link") - return self + return self end def all @@ -132,7 +132,7 @@ def all_parallel end end end - requests.inject([]) do |results, page| + requests.inject([]) do |results, page| results.concat(page.body) end end @@ -145,11 +145,11 @@ def all_parallel end def build_prefix(first_argument, endpoint) - (!first_argument.is_a?(Hash) && !first_argument.nil?) ? + (!first_argument.is_a?(Hash) && !first_argument.nil?) ? File.join(path_prefix, "/#{endpoint}/#{first_argument}") : File.join(path_prefix, "/#{endpoint}") end - private + private def pagination_data(header) parse_link_header header