Method: Might::Paginator#initialize
- Defined in:
- lib/might/paginator.rb
#initialize(options = {}) ⇒ Paginator
Returns a new instance of Paginator.
23 24 25 26 27 28 |
# File 'lib/might/paginator.rb', line 23 def initialize( = {}) @limit = Integer(.fetch(:limit)) @offset = Integer(.fetch(:offset)) fail InvalidLimitOrOffset if @limit < 0 || @offset < 0 end |