Class: Jekyll_Tagger::PageInfo
- Inherits:
-
Liquid::Drop
- Object
- Liquid::Drop
- Jekyll_Tagger::PageInfo
- Defined in:
- lib/jekyll_tagger/page_info.rb
Instance Attribute Summary collapse
-
#number ⇒ Object
readonly
Returns the value of attribute number.
-
#selected ⇒ Object
readonly
Returns the value of attribute selected.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(pager, number, selected) ⇒ PageInfo
constructor
A new instance of PageInfo.
- #liquid_method_missing(method) ⇒ Object
- #valid ⇒ Object
Constructor Details
#initialize(pager, number, selected) ⇒ PageInfo
Returns a new instance of PageInfo.
5 6 7 8 9 10 |
# File 'lib/jekyll_tagger/page_info.rb', line 5 def initialize(pager,number,selected) @pager = pager @number = number @url = @pager.url_maker.call(number) @selected = selected end |
Instance Attribute Details
#number ⇒ Object (readonly)
Returns the value of attribute number.
3 4 5 |
# File 'lib/jekyll_tagger/page_info.rb', line 3 def number @number end |
#selected ⇒ Object (readonly)
Returns the value of attribute selected.
3 4 5 |
# File 'lib/jekyll_tagger/page_info.rb', line 3 def selected @selected end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
3 4 5 |
# File 'lib/jekyll_tagger/page_info.rb', line 3 def url @url end |
Instance Method Details
#liquid_method_missing(method) ⇒ Object
16 17 18 |
# File 'lib/jekyll_tagger/page_info.rb', line 16 def liquid_method_missing(method) method end |
#valid ⇒ Object
12 13 14 |
# File 'lib/jekyll_tagger/page_info.rb', line 12 def valid return @number >= 1 && @number <= @pager.page_count end |