Class: Spina::MenuPresenter
- Inherits:
-
Object
- Object
- Spina::MenuPresenter
- Includes:
- ActionView::Helpers::TagHelper, ActionView::Helpers::UrlHelper
- Defined in:
- app/presenters/spina/menu_presenter.rb
Instance Attribute Summary collapse
-
#active_list_item_css ⇒ Object
Returns the value of attribute active_list_item_css.
-
#collection ⇒ Object
Returns the value of attribute collection.
-
#current_list_item_css ⇒ Object
Returns the value of attribute current_list_item_css.
-
#depth ⇒ Object
Returns the value of attribute depth.
-
#include_drafts ⇒ Object
Returns the value of attribute include_drafts.
-
#link_tag_css ⇒ Object
Returns the value of attribute link_tag_css.
-
#list_css ⇒ Object
Returns the value of attribute list_css.
-
#list_item_css ⇒ Object
Returns the value of attribute list_item_css.
-
#list_item_tag ⇒ Object
Returns the value of attribute list_item_tag.
-
#list_tag ⇒ Object
Returns the value of attribute list_tag.
-
#menu_css ⇒ Object
Returns the value of attribute menu_css.
-
#menu_id ⇒ Object
Returns the value of attribute menu_id.
-
#menu_tag ⇒ Object
Returns the value of attribute menu_tag.
-
#output_buffer ⇒ Object
Returns the value of attribute output_buffer.
Instance Method Summary collapse
-
#initialize(collection) ⇒ MenuPresenter
constructor
A new instance of MenuPresenter.
- #to_html ⇒ Object
Constructor Details
#initialize(collection) ⇒ MenuPresenter
Returns a new instance of MenuPresenter.
16 17 18 19 20 21 22 |
# File 'app/presenters/spina/menu_presenter.rb', line 16 def initialize(collection) @collection = collection @menu_tag = :nav @list_tag = :ul @list_item_tag = :li @include_drafts = false end |
Instance Attribute Details
#active_list_item_css ⇒ Object
Returns the value of attribute active_list_item_css.
6 7 8 |
# File 'app/presenters/spina/menu_presenter.rb', line 6 def active_list_item_css @active_list_item_css end |
#collection ⇒ Object
Returns the value of attribute collection.
6 7 8 |
# File 'app/presenters/spina/menu_presenter.rb', line 6 def collection @collection end |
#current_list_item_css ⇒ Object
Returns the value of attribute current_list_item_css.
6 7 8 |
# File 'app/presenters/spina/menu_presenter.rb', line 6 def current_list_item_css @current_list_item_css end |
#depth ⇒ Object
Returns the value of attribute depth.
6 7 8 |
# File 'app/presenters/spina/menu_presenter.rb', line 6 def depth @depth end |
#include_drafts ⇒ Object
Returns the value of attribute include_drafts.
6 7 8 |
# File 'app/presenters/spina/menu_presenter.rb', line 6 def include_drafts @include_drafts end |
#link_tag_css ⇒ Object
Returns the value of attribute link_tag_css.
6 7 8 |
# File 'app/presenters/spina/menu_presenter.rb', line 6 def link_tag_css @link_tag_css end |
#list_css ⇒ Object
Returns the value of attribute list_css.
6 7 8 |
# File 'app/presenters/spina/menu_presenter.rb', line 6 def list_css @list_css end |
#list_item_css ⇒ Object
Returns the value of attribute list_item_css.
6 7 8 |
# File 'app/presenters/spina/menu_presenter.rb', line 6 def list_item_css @list_item_css end |
#list_item_tag ⇒ Object
Returns the value of attribute list_item_tag.
6 7 8 |
# File 'app/presenters/spina/menu_presenter.rb', line 6 def list_item_tag @list_item_tag end |
#list_tag ⇒ Object
Returns the value of attribute list_tag.
6 7 8 |
# File 'app/presenters/spina/menu_presenter.rb', line 6 def list_tag @list_tag end |
#menu_css ⇒ Object
Returns the value of attribute menu_css.
6 7 8 |
# File 'app/presenters/spina/menu_presenter.rb', line 6 def @menu_css end |
#menu_id ⇒ Object
Returns the value of attribute menu_id.
6 7 8 |
# File 'app/presenters/spina/menu_presenter.rb', line 6 def @menu_id end |
#menu_tag ⇒ Object
Returns the value of attribute menu_tag.
6 7 8 |
# File 'app/presenters/spina/menu_presenter.rb', line 6 def @menu_tag end |
#output_buffer ⇒ Object
Returns the value of attribute output_buffer.
6 7 8 |
# File 'app/presenters/spina/menu_presenter.rb', line 6 def output_buffer @output_buffer end |
Instance Method Details
#to_html ⇒ Object
24 25 26 |
# File 'app/presenters/spina/menu_presenter.rb', line 24 def to_html (roots) end |