Class: Middleman::Pagination::IndexPage
- Inherits:
-
Object
- Object
- Middleman::Pagination::IndexPage
- Defined in:
- lib/middleman/pagination/index_page.rb
Instance Attribute Summary collapse
-
#extension_context ⇒ Object
readonly
Returns the value of attribute extension_context.
-
#first_index ⇒ Object
readonly
Returns the value of attribute first_index.
-
#page_num ⇒ Object
readonly
Returns the value of attribute page_num.
-
#pageable_context ⇒ Object
readonly
Returns the value of attribute pageable_context.
-
#symbolic_replacement_path ⇒ Object
readonly
Returns the value of attribute symbolic_replacement_path.
Instance Method Summary collapse
-
#initialize(extension_context, first_index, pageable_context, page_num, symbolic_replacement_path) ⇒ IndexPage
constructor
A new instance of IndexPage.
- #resource ⇒ Object
Constructor Details
#initialize(extension_context, first_index, pageable_context, page_num, symbolic_replacement_path) ⇒ IndexPage
Returns a new instance of IndexPage.
7 8 9 10 11 12 13 |
# File 'lib/middleman/pagination/index_page.rb', line 7 def initialize(extension_context, first_index, pageable_context, page_num, symbolic_replacement_path) @extension_context = extension_context @first_index = first_index @pageable_context = pageable_context @page_num = page_num @symbolic_replacement_path = symbolic_replacement_path end |
Instance Attribute Details
#extension_context ⇒ Object (readonly)
Returns the value of attribute extension_context.
5 6 7 |
# File 'lib/middleman/pagination/index_page.rb', line 5 def extension_context @extension_context end |
#first_index ⇒ Object (readonly)
Returns the value of attribute first_index.
5 6 7 |
# File 'lib/middleman/pagination/index_page.rb', line 5 def first_index @first_index end |
#page_num ⇒ Object (readonly)
Returns the value of attribute page_num.
5 6 7 |
# File 'lib/middleman/pagination/index_page.rb', line 5 def page_num @page_num end |
#pageable_context ⇒ Object (readonly)
Returns the value of attribute pageable_context.
5 6 7 |
# File 'lib/middleman/pagination/index_page.rb', line 5 def pageable_context @pageable_context end |
#symbolic_replacement_path ⇒ Object (readonly)
Returns the value of attribute symbolic_replacement_path.
5 6 7 |
# File 'lib/middleman/pagination/index_page.rb', line 5 def symbolic_replacement_path @symbolic_replacement_path end |
Instance Method Details
#resource ⇒ Object
15 16 17 18 19 |
# File 'lib/middleman/pagination/index_page.rb', line 15 def resource res = ::Middleman::Sitemap::Resource.new(sitemap, path, source_file) res.() res end |