Class: JsonApiPaginator
- Inherits:
-
JsonApiClient::Paginating::NestedParamPaginator
- Object
- JsonApiClient::Paginating::NestedParamPaginator
- JsonApiPaginator
- Defined in:
- lib/json_api_paginator.rb
Instance Attribute Summary collapse
-
#meta ⇒ Object
readonly
Returns the value of attribute meta.
Instance Method Summary collapse
-
#initialize(result_set, data) ⇒ JsonApiPaginator
constructor
A new instance of JsonApiPaginator.
- #total_entries ⇒ Object
Constructor Details
#initialize(result_set, data) ⇒ JsonApiPaginator
Returns a new instance of JsonApiPaginator.
7 8 9 10 |
# File 'lib/json_api_paginator.rb', line 7 def initialize(result_set, data) super @meta = data['meta'] || {} end |
Instance Attribute Details
#meta ⇒ Object (readonly)
Returns the value of attribute meta.
5 6 7 |
# File 'lib/json_api_paginator.rb', line 5 def @meta end |
Instance Method Details
#total_entries ⇒ Object
12 13 14 |
# File 'lib/json_api_paginator.rb', line 12 def total_entries ['total_count'].to_i || super end |