Class: Ludy::NullPaginator

Inherits:
Paginator show all
Includes:
Singleton
Defined in:
lib/ludy/paginator.rb

Overview

a null paginator that stubs any page into a null page.

Instance Attribute Summary

Attributes inherited from Paginator

#counter, #fetcher, #per_page

Instance Method Summary collapse

Methods inherited from Paginator

#==, #count, #each, null, #offset, #size, #to_a

Constructor Details

#initializeNullPaginator

Returns a new instance of NullPaginator.



142
# File 'lib/ludy/paginator.rb', line 142

def initialize; super(lambda{|*a|[]}, lambda{0}); end

Instance Method Details

#page(page) ⇒ Object



143
# File 'lib/ludy/paginator.rb', line 143

def page page; page == 0 ? NullPage.instance : nil; end