Class: Fidelity::PaginationHelper::Pagination::Item
- Inherits:
-
Object
- Object
- Fidelity::PaginationHelper::Pagination::Item
- Defined in:
- app/fidelity/widgets/pagination/helpers/pagination_helper.rb
Instance Attribute Summary collapse
-
#current ⇒ Object
Returns the value of attribute current.
-
#page ⇒ Object
Returns the value of attribute page.
Instance Method Summary collapse
- #current? ⇒ Boolean
-
#initialize(page = 1, current = 1) ⇒ Item
constructor
A new instance of Item.
- #show? ⇒ Boolean
Constructor Details
#initialize(page = 1, current = 1) ⇒ Item
Returns a new instance of Item.
50 51 52 53 |
# File 'app/fidelity/widgets/pagination/helpers/pagination_helper.rb', line 50 def initialize page=1, current=1 @page = page @current = current==page end |
Instance Attribute Details
#current ⇒ Object
Returns the value of attribute current.
49 50 51 |
# File 'app/fidelity/widgets/pagination/helpers/pagination_helper.rb', line 49 def current @current end |
#page ⇒ Object
Returns the value of attribute page.
49 50 51 |
# File 'app/fidelity/widgets/pagination/helpers/pagination_helper.rb', line 49 def page @page end |
Instance Method Details
#current? ⇒ Boolean
59 60 61 |
# File 'app/fidelity/widgets/pagination/helpers/pagination_helper.rb', line 59 def current? @current end |
#show? ⇒ Boolean
55 56 57 |
# File 'app/fidelity/widgets/pagination/helpers/pagination_helper.rb', line 55 def show? !@page.nil? end |