Class: Sunspot::Rails::StubSessionProxy::PaginatedCollection

Inherits:
Array
  • Object
show all
Defined in:
lib/sunspot/rails/stub_session_proxy.rb

Instance Method Summary collapse

Instance Method Details

#current_pageObject



100
101
102
# File 'lib/sunspot/rails/stub_session_proxy.rb', line 100

def current_page
  1
end

#first_page?Boolean

Returns:

  • (Boolean)


114
115
116
# File 'lib/sunspot/rails/stub_session_proxy.rb', line 114

def first_page?
  true
end

#last_page?Boolean

Returns:

  • (Boolean)


118
119
120
# File 'lib/sunspot/rails/stub_session_proxy.rb', line 118

def last_page?
  true
end

#next_pageObject



126
127
128
# File 'lib/sunspot/rails/stub_session_proxy.rb', line 126

def next_page
  nil
end

#offsetObject



134
135
136
# File 'lib/sunspot/rails/stub_session_proxy.rb', line 134

def offset
  0
end

#out_of_bounds?Boolean

Returns:

  • (Boolean)


130
131
132
# File 'lib/sunspot/rails/stub_session_proxy.rb', line 130

def out_of_bounds?
  false
end

#per_pageObject Also known as: limit_value



104
105
106
# File 'lib/sunspot/rails/stub_session_proxy.rb', line 104

def per_page
  30
end

#previous_pageObject



122
123
124
# File 'lib/sunspot/rails/stub_session_proxy.rb', line 122

def previous_page
  nil
end

#total_countObject Also known as: total_entries



95
96
97
# File 'lib/sunspot/rails/stub_session_proxy.rb', line 95

def total_count
  0
end

#total_pagesObject Also known as: num_pages



109
110
111
# File 'lib/sunspot/rails/stub_session_proxy.rb', line 109

def total_pages
  1
end