Class: Spina::MenuPresenter

Inherits:
Object
  • Object
show all
Includes:
ActionView::Helpers::TagHelper, ActionView::Helpers::UrlHelper, ActiveSupport::Configurable
Defined in:
app/presenters/spina/menu_presenter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(collection) ⇒ MenuPresenter

Returns a new instance of MenuPresenter.



23
24
25
# File 'app/presenters/spina/menu_presenter.rb', line 23

def initialize(collection)
  @collection = collection
end

Instance Attribute Details

#collectionObject

Returns the value of attribute collection.



7
8
9
# File 'app/presenters/spina/menu_presenter.rb', line 7

def collection
  @collection
end

#output_bufferObject

Returns the value of attribute output_buffer.



7
8
9
# File 'app/presenters/spina/menu_presenter.rb', line 7

def output_buffer
  @output_buffer
end

Instance Method Details

#to_htmlObject



27
28
29
# File 'app/presenters/spina/menu_presenter.rb', line 27

def to_html
  render_menu(roots)
end