Class: SeatGeek::Query::Pagination
- Inherits:
-
Object
- Object
- SeatGeek::Query::Pagination
- Defined in:
- lib/seat_geek/query/pagination.rb
Instance Method Summary collapse
-
#initialize(options) ⇒ Pagination
constructor
A new instance of Pagination.
- #query ⇒ Object
Constructor Details
#initialize(options) ⇒ Pagination
Returns a new instance of Pagination.
4 5 6 7 |
# File 'lib/seat_geek/query/pagination.rb', line 4 def initialize() @per_page = .fetch(:per_page) { 25 } @page = .fetch(:page) { 1 } end |
Instance Method Details
#query ⇒ Object
9 10 11 |
# File 'lib/seat_geek/query/pagination.rb', line 9 def query "&per_page=#{@per_page}&page=#{@page}" end |