Class: Ludy::NullPaginator
- 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
Instance Method Summary collapse
-
#initialize ⇒ NullPaginator
constructor
A new instance of NullPaginator.
- #page(page) ⇒ Object
Methods inherited from Paginator
#==, #count, #each, null, #offset, #size, #to_a
Constructor Details
#initialize ⇒ NullPaginator
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 |