class S3Search::ResultPage
Attributes
response[R]
results[R]
Public Class Methods
new(response, client)
click to toggle source
# File lib/s3search/result_page.rb, line 6 def initialize response, client @response = response @results = response.results @client = client end
Public Instance Methods
next()
click to toggle source
# File lib/s3search/result_page.rb, line 12 def next return unless next? change_page(links.next) end
next?()
click to toggle source
# File lib/s3search/result_page.rb, line 17 def next? links.next end
prev()
click to toggle source
# File lib/s3search/result_page.rb, line 21 def prev return unless prev? change_page(links.prev) end
prev?()
click to toggle source
# File lib/s3search/result_page.rb, line 26 def prev? links.prev end
respond_to_missing?(method_name, include_private=false)
click to toggle source
# File lib/s3search/result_page.rb, line 30 def respond_to_missing? method_name, include_private=false results.respond_to?(method_name, include_private) || response.respond_to?(method_name, include_private) end
Private Instance Methods
change_page(link)
click to toggle source
# File lib/s3search/result_page.rb, line 36 def change_page link @response = @client._get(link) @results = @response.results S3Search::ResultPage.new(@response, @client) end
method_missing(method_name, *args, &block)
click to toggle source
Calls superclass method
# File lib/s3search/result_page.rb, line 42 def method_missing method_name, *args, &block if results.respond_to?(method_name) results.send method_name, *args, &block elsif response.respond_to?(method_name) response.send method_name, *args, &block else super end end