Class: Middleman::Pagination::IndexPage

Inherits:
Object
  • Object
show all
Defined in:
lib/middleman/pagination/index_page.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_contextObject (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_indexObject (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_numObject (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_contextObject (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_pathObject (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

#resourceObject



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