Class: Pyper::Pipes::Cassandra::PaginationEncoding
- Inherits:
-
Object
- Object
- Pyper::Pipes::Cassandra::PaginationEncoding
- Defined in:
- lib/pyper/pipes/cassandra/pagination_encoding.rb
Overview
Given a :paging_state in the status field, encodes it. This is the reverse transformation of the PaginationDecoding pipe.
Instance Method Summary collapse
-
#pipe(items, status) ⇒ Enumerable<Hash>
The unchanged list of items.
Instance Method Details
#pipe(items, status) ⇒ Enumerable<Hash>
Returns The unchanged list of items.
11 12 13 14 15 |
# File 'lib/pyper/pipes/cassandra/pagination_encoding.rb', line 11 def pipe(items, status) page_state = status[:paging_state] status[:paging_state] = Base64.urlsafe_encode64(page_state) if page_state items end |