Method: Elasticsearch::Model::Response::Pagination::WillPaginate.included
- Defined in:
- lib/elasticsearch/model/response/pagination/will_paginate.rb
.included(base) ⇒ Object
30 31 32 33 34 35 36 37 38 |
# File 'lib/elasticsearch/model/response/pagination/will_paginate.rb', line 30 def self.included(base) base.__send__ :include, ::WillPaginate::CollectionMethods # Include the paging methods in results and records # methods = [:current_page, :offset, :length, :per_page, :total_entries, :total_pages, :previous_page, :next_page, :out_of_bounds?] Elasticsearch::Model::Response::Results.__send__ :delegate, *methods, to: :response Elasticsearch::Model::Response::Records.__send__ :delegate, *methods, to: :response end |