Class: Sunspot::Rails::StubSessionProxy::PaginatedCollection
- Inherits:
-
Array
- Object
- Array
- Sunspot::Rails::StubSessionProxy::PaginatedCollection
- Defined in:
- lib/sunspot/rails/stub_session_proxy.rb
Instance Method Summary collapse
- #current_page ⇒ Object
- #first_page? ⇒ Boolean
- #last_page? ⇒ Boolean
- #next_page ⇒ Object
- #offset ⇒ Object
- #out_of_bounds? ⇒ Boolean
- #per_page ⇒ Object (also: #limit_value)
- #previous_page ⇒ Object
- #total_count ⇒ Object (also: #total_entries)
- #total_pages ⇒ Object (also: #num_pages)
Instance Method Details
#current_page ⇒ Object
100 101 102 |
# File 'lib/sunspot/rails/stub_session_proxy.rb', line 100 def current_page 1 end |
#first_page? ⇒ Boolean
114 115 116 |
# File 'lib/sunspot/rails/stub_session_proxy.rb', line 114 def first_page? true end |
#last_page? ⇒ Boolean
118 119 120 |
# File 'lib/sunspot/rails/stub_session_proxy.rb', line 118 def last_page? true end |
#next_page ⇒ Object
126 127 128 |
# File 'lib/sunspot/rails/stub_session_proxy.rb', line 126 def next_page nil end |
#offset ⇒ Object
134 135 136 |
# File 'lib/sunspot/rails/stub_session_proxy.rb', line 134 def offset 0 end |
#out_of_bounds? ⇒ Boolean
130 131 132 |
# File 'lib/sunspot/rails/stub_session_proxy.rb', line 130 def out_of_bounds? false end |
#per_page ⇒ Object Also known as: limit_value
104 105 106 |
# File 'lib/sunspot/rails/stub_session_proxy.rb', line 104 def per_page 30 end |
#previous_page ⇒ Object
122 123 124 |
# File 'lib/sunspot/rails/stub_session_proxy.rb', line 122 def previous_page nil end |
#total_count ⇒ Object Also known as: total_entries
95 96 97 |
# File 'lib/sunspot/rails/stub_session_proxy.rb', line 95 def total_count 0 end |
#total_pages ⇒ Object Also known as: num_pages
109 110 111 |
# File 'lib/sunspot/rails/stub_session_proxy.rb', line 109 def total_pages 1 end |