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

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



68
69
70
71
72
# File 'lib/jekyll-paginate-v2-redux/generator/paginator.rb', line 68

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

Instance Attribute Details

#numObject (readonly)

Returns the value of attribute num.



66
67
68
# File 'lib/jekyll-paginate-v2-redux/generator/paginator.rb', line 66

def num
  @num
end

#pathObject (readonly)

Returns the value of attribute path.



66
67
68
# File 'lib/jekyll-paginate-v2-redux/generator/paginator.rb', line 66

def path
  @path
end

#titleObject (readonly)

Returns the value of attribute title.



66
67
68
# File 'lib/jekyll-paginate-v2-redux/generator/paginator.rb', line 66

def title
  @title
end

Instance Method Details

#to_liquidObject

func initialize



74
75
76
77
78
79
80
# File 'lib/jekyll-paginate-v2-redux/generator/paginator.rb', line 74

def to_liquid
  {
    'num' => num,
    'path' => path+"index.html",
    'title' => title
  }
end