Class: Array
- Inherits:
-
Object
- Object
- Array
- Defined in:
- lib/whisper/common.rb
Instance Method Summary collapse
Instance Method Details
#paginate(page_size) ⇒ Object
12 13 14 |
# File 'lib/whisper/common.rb', line 12 def paginate page_size (0 .. ((size - 1) / page_size)).map { |p| self[(p * page_size) ... ((p + 1) * page_size)] } end |