Class: Jekyll::PaginateV2::Generator::PageTrail

Inherits:
Object
  • Object
show all
Defined in:
lib/jekyll-paginate-v2/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

Instance Method Summary collapse

Constructor Details

#initialize(num, path, title) ⇒ PageTrail

Returns a new instance of PageTrail.



95
96
97
98
99
# File 'lib/jekyll-paginate-v2/generator/paginator.rb', line 95

def initialize( num, path, title )
  @num = num
  @path = path
  @title = title
end

Instance Attribute Details

#numObject (readonly)

Returns the value of attribute num.



93
94
95
# File 'lib/jekyll-paginate-v2/generator/paginator.rb', line 93

def num
  @num
end

#pathObject (readonly)

Returns the value of attribute path.



93
94
95
# File 'lib/jekyll-paginate-v2/generator/paginator.rb', line 93

def path
  @path
end

#titleObject (readonly)

Returns the value of attribute title.



93
94
95
# File 'lib/jekyll-paginate-v2/generator/paginator.rb', line 93

def title
  @title
end

Instance Method Details

#to_liquidObject

func initialize



101
102
103
104
105
106
107
# File 'lib/jekyll-paginate-v2/generator/paginator.rb', line 101

def to_liquid
  {
    'num' => num,
    'path' => path,
    'title' => title
  }
end