Class: Georgia::PaginationPresenter

Inherits:
Presenter
  • Object
show all
Defined in:
app/presenters/georgia/pagination_presenter.rb

Defined Under Namespace

Classes: SearchCount

Instance Attribute Summary

Attributes inherited from Presenter

#view_context

Instance Method Summary collapse

Constructor Details

#initialize(view_context, search, options) ⇒ PaginationPresenter

Returns a new instance of PaginationPresenter.



4
5
6
7
8
# File 'app/presenters/georgia/pagination_presenter.rb', line 4

def initialize view_context, search, options
  super
  @search = search
  @options = options
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Georgia::Presenter

Instance Method Details

#to_sObject



10
11
12
13
14
15
# File 'app/presenters/georgia/pagination_presenter.rb', line 10

def to_s
  return unless @search and !@search.total_count.zero?
  (:div, class: 'header-pagination') do
    search_count_tag + navigation_tags
  end
end