Class: Bridgetown::Paginate::PageTrail
- Inherits:
-
Object
- Object
- Bridgetown::Paginate::PageTrail
- Defined in:
- bridgetown-paginate/lib/bridgetown-paginate/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
Constructor Details
#initialize(num, path, title) ⇒ PageTrail
Returns a new instance of PageTrail.
143 144 145 146 147 |
# File 'bridgetown-paginate/lib/bridgetown-paginate/paginator.rb', line 143 def initialize(num, path, title) @num = num @path = path @title = title end |
Instance Attribute Details
#num ⇒ Object (readonly)
Returns the value of attribute num.
141 142 143 |
# File 'bridgetown-paginate/lib/bridgetown-paginate/paginator.rb', line 141 def num @num end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
141 142 143 |
# File 'bridgetown-paginate/lib/bridgetown-paginate/paginator.rb', line 141 def path @path end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
141 142 143 |
# File 'bridgetown-paginate/lib/bridgetown-paginate/paginator.rb', line 141 def title @title end |
Instance Method Details
#to_liquid ⇒ Object
149 150 151 152 153 154 155 |
# File 'bridgetown-paginate/lib/bridgetown-paginate/paginator.rb', line 149 def to_liquid { "num" => num, "path" => path, "title" => title, } end |