Class: Middleman::Pagination::Pageable
- Inherits:
-
Object
- Object
- Middleman::Pagination::Pageable
- Defined in:
- lib/middleman/pagination/pageable.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, &block) ⇒ Pageable
constructor
A new instance of Pageable.
- #new_resources(extension_context, resources) ⇒ Object
Constructor Details
#initialize(name, &block) ⇒ Pageable
Returns a new instance of Pageable.
7 8 9 10 |
# File 'lib/middleman/pagination/pageable.rb', line 7 def initialize(name, &block) @name = name @set = block end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/middleman/pagination/pageable.rb', line 5 def name @name end |
Instance Method Details
#new_resources(extension_context, resources) ⇒ Object
12 13 14 15 16 |
# File 'lib/middleman/pagination/pageable.rb', line 12 def new_resources(extension_context, resources) pagination_indexes(resources).map do |resource| new_pages_for_index(extension_context, resource, resources) end.compact end |