Class: HorizontalNavPresenter

Inherits:
BasePresenter show all
Defined in:
app/presenters/horizontal_nav_presenter.rb

Instance Method Summary collapse

Methods inherited from BasePresenter

#initialize

Constructor Details

This class inherits a constructor from BasePresenter

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class BasePresenter

Instance Method Details

#horizontal_nav_htmlObject



8
9
10
11
12
# File 'app/presenters/horizontal_nav_presenter.rb', line 8

def horizontal_nav_html
  ul_tag do
    nav_lis
  end.html_safe
end


22
23
24
# File 'app/presenters/horizontal_nav_presenter.rb', line 22

def nav_link_objects
  horizontal_nav.link_objects
end


14
15
16
17
18
19
20
# File 'app/presenters/horizontal_nav_presenter.rb', line 14

def nav_lis
  nav_link_objects.collect do |nav_link_object|
    li_tag(nav_link_object) do
      nav_link(nav_link_object)
    end
  end.join("\n").html_safe
end

#presentObject



4
5
6
# File 'app/presenters/horizontal_nav_presenter.rb', line 4

def present
  horizontal_nav_html
end