Module: FlexmlsApi::PaginateResponse
- Defined in:
- lib/flexmls_api/paginate.rb
Overview
Paginate Api Responses
Module used by the request layer to decorate the response’s results array with paging support. Pagination only happens if the response includes the pagination information as specified by the API.
Instance Attribute Summary collapse
-
#results ⇒ Object
Returns the value of attribute results.
Instance Method Summary collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_symbol, *arguments) ⇒ Object
68 69 70 71 72 73 74 |
# File 'lib/flexmls_api/paginate.rb', line 68 def method_missing(method_symbol, *arguments) if results.respond_to?(method_symbol) arguments.empty? ? self.results.send(method_symbol) : self.results.send(method_symbol, arguments) else super end end |
Instance Attribute Details
#results ⇒ Object
Returns the value of attribute results.
67 68 69 |
# File 'lib/flexmls_api/paginate.rb', line 67 def results @results end |