Class: Jekyll::J1Paginator::Generator::PageTrail
- Inherits:
-
Object
- Object
- Jekyll::J1Paginator::Generator::PageTrail
- Defined in:
- lib/j1-paginator/generator/paginator.rb
Overview
Small utility class that handles individual pagination trails and makes them easier to work with in Liquid
Instance Attribute Summary collapse
-
#num ⇒ Object
readonly
Returns the value of attribute num.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize(num, path, title) ⇒ PageTrail
constructor
A new instance of PageTrail.
-
#to_liquid ⇒ Object
func initialize.
Constructor Details
#initialize(num, path, title) ⇒ PageTrail
Returns a new instance of PageTrail.
88 89 90 91 92 |
# File 'lib/j1-paginator/generator/paginator.rb', line 88 def initialize( num, path, title ) @num = num @path = path @title = title end |
Instance Attribute Details
#num ⇒ Object (readonly)
Returns the value of attribute num.
86 87 88 |
# File 'lib/j1-paginator/generator/paginator.rb', line 86 def num @num end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
86 87 88 |
# File 'lib/j1-paginator/generator/paginator.rb', line 86 def path @path end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
86 87 88 |
# File 'lib/j1-paginator/generator/paginator.rb', line 86 def title @title end |
Instance Method Details
#to_liquid ⇒ Object
func initialize
94 95 96 97 98 99 100 |
# File 'lib/j1-paginator/generator/paginator.rb', line 94 def to_liquid { 'num' => num, 'path' => path, 'title' => title } end |