lib/archivesspace/client/pagination.rb in archivesspace-client-0.1.12 vs lib/archivesspace/client/pagination.rb in archivesspace-client-0.2.0

- old
+ new

@@ -18,11 +18,11 @@ subjects users ] ENDPOINTS.each do |endpoint| - method_name = endpoint.split('/').last # remove prefix + method_name = endpoint.split("/").last # remove prefix define_method(method_name) do |options = {}| all(endpoint, options) end end @@ -34,11 +34,11 @@ options[:query] ||= {} options[:query][:page] = page result = get(path, options) results = [] - if result.parsed.respond_to?(:key) && result.parsed.key?('results') - results = result.parsed['results'] + if result.parsed.respond_to?(:key) && result.parsed.key?("results") + results = result.parsed["results"] else results = result.parsed unlimited_listing = true end