Class: Jekyll::CollectionPages::PathTemplate
- Inherits:
-
Object
- Object
- Jekyll::CollectionPages::PathTemplate
- Defined in:
- lib/jekyll/collection_pages/path_template.rb
Instance Attribute Summary collapse
-
#collection_name ⇒ Object
readonly
Returns the value of attribute collection_name.
-
#tag_field ⇒ Object
readonly
Returns the value of attribute tag_field.
Instance Method Summary collapse
-
#initialize(raw_template:, tag_field:, collection_name:, require_num: true) ⇒ PathTemplate
constructor
A new instance of PathTemplate.
- #template ⇒ Object
Constructor Details
#initialize(raw_template:, tag_field:, collection_name:, require_num: true) ⇒ PathTemplate
Returns a new instance of PathTemplate.
10 11 12 13 14 15 |
# File 'lib/jekyll/collection_pages/path_template.rb', line 10 def initialize(raw_template:, tag_field:, collection_name:, require_num: true) @tag_field = tag_field @collection_name = collection_name @require_num = require_num @template = build_effective_template(raw_template) end |
Instance Attribute Details
#collection_name ⇒ Object (readonly)
Returns the value of attribute collection_name.
8 9 10 |
# File 'lib/jekyll/collection_pages/path_template.rb', line 8 def collection_name @collection_name end |
#tag_field ⇒ Object (readonly)
Returns the value of attribute tag_field.
8 9 10 |
# File 'lib/jekyll/collection_pages/path_template.rb', line 8 def tag_field @tag_field end |
Instance Method Details
#template ⇒ Object
17 18 19 |
# File 'lib/jekyll/collection_pages/path_template.rb', line 17 def template "/#{@template}" end |