Class: RailsPaginate::Pagers::Base
- Inherits:
-
Object
- Object
- RailsPaginate::Pagers::Base
- Defined in:
- lib/rails_paginate/pagers/base.rb
Overview
base method
Direct Known Subclasses
Instance Attribute Summary collapse
-
#collection ⇒ Object
readonly
default reader.
-
#options ⇒ Object
readonly
default reader.
Instance Method Summary collapse
-
#current_page ⇒ Object
current_page.
-
#initialize(collection, options = {}) ⇒ Base
constructor
set default collection and options.
-
#pages ⇒ Object
total count.
-
#visible_pages ⇒ Object
abstract.
Constructor Details
#initialize(collection, options = {}) ⇒ Base
set default collection and options
8 9 10 11 |
# File 'lib/rails_paginate/pagers/base.rb', line 8 def initialize(collection, = {}) @collection = collection @options = end |
Instance Attribute Details
#collection ⇒ Object (readonly)
default reader
5 6 7 |
# File 'lib/rails_paginate/pagers/base.rb', line 5 def collection @collection end |
#options ⇒ Object (readonly)
default reader
5 6 7 |
# File 'lib/rails_paginate/pagers/base.rb', line 5 def @options end |
Instance Method Details
#current_page ⇒ Object
current_page
14 15 16 |
# File 'lib/rails_paginate/pagers/base.rb', line 14 def current_page collection.current_page end |
#pages ⇒ Object
total count
19 20 21 |
# File 'lib/rails_paginate/pagers/base.rb', line 19 def pages collection.pages end |
#visible_pages ⇒ Object
abstract
24 25 26 |
# File 'lib/rails_paginate/pagers/base.rb', line 24 def visible_pages raise StandardError, "render is not implemented" end |